Can I cache 404s on Dispatcher? | Community
Skip to main content
jkpanera
Level 4
May 13, 2019
Solved

Can I cache 404s on Dispatcher?

  • May 13, 2019
  • 13 replies
  • 8107 views

We are seeing a large amount of 404 requests on our AEM application putting undue load on our publish server. Found requests get cached on dispatcher, but 404s fall through to publish even if the same location was requested a minute ago.

Is there a way to configure dispatcher to cache 404s? For example if user A requests http://domain.com/content/not-exist.html, dispatcher could cache the error page at the location /content/not-exist.html. Then if we do publish not-exist.html, it would get evicted at that time.

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

No, I am not aware of a possibility to cache the 404 response on dispatcher. it would be a negative cache entry (that means an entry that means a non-existing file), and afaik it's not implemented. Having it would be a nice feature, though.

Can you raise a feature request on the dispatcher with Adobe support?

Jörg

13 replies

arunpatidar
Community Advisor
Community Advisor
May 14, 2019

Not a good idea to serve 404 over 200 response, it would impact SEO.

Arun Patidar
jkpanera
jkpaneraAuthor
Level 4
May 14, 2019

Yeah, I appreciate the suggestion gauravb10066713​ but we won't be doing that. SEO may be one problem, but we also don't want users' browsers caching those responses as 200s.

Level 2
January 30, 2024

@jkpanera did you find any solution for this