My site is serving mostly plain txt files in the format mysite.com/some_file.txt?v=5-2-2020
Each is requested by and served to hundreds of clients so I am expecting a very high cache percentage but it doesn’t seem to work that way.
Any ideas why?
Go figure… .txt files aren’t a filetype Cloudflare caches by default.
Try adding a Page Rule to match
example.com/*.txt* with Settings for Cache Level (Everything) and Edge Cache TTL (7 days, or whatever you’re comfortable with).
NOTE: I’m not entirely sure the * after .txt is necessary to match query strings.
I will try that thank you.
The 24H graph shows that the cache hit is very low even for a few hours window.
I would love to understand why they are not cached -nearly at all- though
Have you reviewed the headers to see if the content can be cached, and is cached?
Didnt check the headers before my bad:/
I am getting cache hits now. I enabled the page rule so not sure if that helped
I will keep an eye on it the next time we get high volume traffic.
This topic was automatically closed after 30 days. New replies are no longer allowed.