• Resolved Jason LeMahieu (MadtownLems)

    (@madtownlems)


    Howdy πŸ‘‹

    I noticed that Surge doesn’t seem to be involved in requests that 404. X-Cache header is always ‘bypass’.

    Curious if that’s an intentional choice, technically unfeasible, or perhaps something that could/should be added?


    Thanks much as always!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Konstantin Kovshenin

    (@kovshenin)

    Hey Jason,

    Surge definitely considers a 404 response for caching, however WordPress core sends nocache headers by default for 404 requests, which the Surge plugin respects. If you’d like to actually cache and serve 404 request, you’ll have to modify the default core behavior using the pre_handle_404 or nocache_headers filters to prevent these headers from being sent.

    Hope that helps!

    Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    >> Hope that helps!

    Yes – it helps a ton and we’re now Surge-caching our 404 pages. Thanks for the continued support!

    Plugin Author Konstantin Kovshenin

    (@kovshenin)

    You’re very welcome!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.