Is there a way of stopping 302/301 and 404s being cached?
Closed this issue · 1 comments
davidu1975 commented
Is there a way of stopping 302/301 and 404s being cached? automatically
vsalvino commented
Yes, use the is_response_cacheable
hook. Check request.status
and return False. https://docs.coderedcorp.com/wagtail-cache/getting_started/hooks.html
Side note, I'd highly recommend caching 404s as those are very frequent (e.g. bots probing for WordPress URLs) and they are taxing on the database.