A website that I have on Cloudflare (Pro plan) offers PDF downloads under URLs like this:
- and many more…
These files need to be updated to new version occasionally while keeping the same name.
We have an admin that looks after files uploads, website content updates, etc. and she complains that after she uploads new PDF files with the same name and test downloading them, the old files are being downloaded.
I suspect that Cloudflare cache does not get updated immediately after the new files are uploaded.
What can I do about this without sacrificing overall website cache performance? Current caching level is Standard and Browser Cache TTL is 4 hours.
Two ways I can think of is to create a page rule for the path mysite.example.com/storage/content/corporate/* and bypass the cache or set Browser Cache TTL for this path at 30 minutes (minimum value). Both methods aren’t ideal as they defeat the purpose of caching. What I am really looking for is how to automatically update cache immediately after new files are uploaded without purging cache manually every time.