Stale While Revalidate Expires

Rafael Cirolini Rafael.Cirolini at corp.terra.com
Tue Jun 6 19:33:24 UTC 2017


We've just updated to 1.12 to use the stale-while-revalidate option.

The application is who sends the cache-control header, like this:
cache-control:max-age=180, stale-while-revalidate=60, stale-if-error=864000

If I understood how SWR works, the user shouldn't receive stale content after 180+60 seconds.

But we are seing stale content after this time.
X-Cache-Status: STALE

Our DevOps team did a debug:
2017/05/22 15:14:31 [debug] 21376#21376: *44 http file cache expired: 4 1495476646 1495476871
2017/05/22 15:14:31 [debug] 21376#21376: *44 http upstream cache: 4
2017/05/22 15:14:31 [debug] 21376#21376: *44 http file cache send: /var/cache/nginx/d/d2/fb19e1c85db7bda5c92ce21530bf5d2d
2017/05/22 15:14:31 [debug] 21376#21376: *44 http ims:1491861925 lm:1491861925
2017/05/22 15:14:31 [debug] 21376#21376: *44 http script var: "STALE"

The correct answer should be EXPIRED after the max-age+SWR time.

It looks reasonble to you?

Thanks.

Rafael Cirolini
Sup Programmatic & Digital Services
Terra Global

________________________________
Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, podem conter informação privilegiada ou confidencial e são de uso exclusivo da pessoa ou entidade de destino. Se não for destinatário desta mensagem, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por engano, pedimos que nos comunique imediatamente por esta mesma via e, em seguida, apague-a.

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted él destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le pedimos que nos lo comunique inmediatamente por esta misma vía y proceda a su exclusión.

The information contained in this transmissión is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170606/dce82964/attachment-0001.html>


More information about the nginx mailing list