When the infamous "Page is being generated" message pops up,
there are HTTP headers sent which are wrong.
a) "Expire" includes a typo and should be called "Expires"
b) "Retry-after" => the client should re-check in 30 seconds not 3600sec
c) Since "Cache-control" only contains "no-cache" but not "private"
this means that any proxy is allowed to keep this information as well,
as they may obey the no-cache directive. (quote from rfc7234:
"Note: Although it has been back-ported to many implementations, some
HTTP/1.0 caches will not recognize or obey this [no-cache] directive.")
That would prevent the possibility for clients to manually refresh, forcing
them to wait for the proxy-to re-ask again. We use a similar construct
("private, no-strict") in another scenario, so this is a "nice-to-have"
fix, since "Expires: 0" should do the job already.
Some additional notes are also added in the comments.
The main fix is to not cache these 503 requests anymore.
Some references:
Header "Expires" not "Expire" - http://httpd.apache.org/docs/current/mod/mod_expires.html
Cache-Control:
https://docs.fastly.com/guides/tutorials/cache-control-tutorial#do-not-cache
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
https://sookocheff.com/post/api/effective-caching/