Closed petetak closed 5 years ago
Caching 404's is not bad thing - it's kind of intentional. @petetak What's your actual issue?
I'm using Cloudflare and I quickly go over the 500 url limit when upper calls to invalidate a page.
It's maybe an edge case but it's a new site that is running on the same domain as an old site, so there are many 404s coming in (which I can fix with some redirects which should stop this issue for now)
But it kind of made me wonder if 404s in the upper table would ever get removed since they are not actual real craft entries
If you have a custom 404
template you can control the cache behaviour with
{% header "Cache-Control: private, no-cache" %}
Does this solve your issue?
I'll review Cloudflare's API limits again and try to avoid them.
Thanks @ostark that works - that's a much better solution!
If you get a lot of 404s then this can lead to further issues.
In EventRegistrar.php line 99 a check could be added, although you might want to call a method that checks for other status codes as well, or only insert a 200 code.