Estou hospedando o redmine com nginx + thin com cache de conteúdo estático
A pergunta é: é ou não é armazenada em cache pelo navegador?
configuração de cache do nginx:
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
# Some basic cache-control for static files to be sent to the browser
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
aqui estão os cabeçalhos de resposta:
Request URL:http://redmine/javascripts/prototype.js?1251746896
Request Method:GET
Status Code:304 Not Modified
Request Headers
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-GB,en-US;q=0.8,en;q=0.6
Cache-Control:max-age=0
Connection:keep-alive
Cookie: <hiden>
Host:redmine
If-Modified-Since:Mon, 31 Aug 2009 19:28:16 GMT
Referer:http://redmine/issues/
User-Agent: <someuseragent>
Query String Parameters
1251746896:
Response Headers
Cache-Control:max-age=315360000, public, must-revalidate, proxy-revalidate
Connection:keep-alive
Date:Fri, 09 Dec 2011 01:15:12 GMT
Expires:Thu, 31 Dec 2037 23:55:55 GMT
Last-Modified:Mon, 31 Aug 2009 19:28:16 GMT
Pragma:public
Server:nginx/0.7.67
No entanto, a auditoria de cromo ainda diz:
The following resources are explicitly non-cacheable. Consider making them cacheable if possible: