I recently released a Rails 3.1 upgrade of my webapp. I power this app on an Unbuntu 10.04 VPS with Thin on the backend, Nginx on the front. To make my app work with the new Rails asset pipeline I added the following entry to my Nginx config file:
location ~ ^/(assets|images|javascripts|stylesheets|swfs|system)/ {
access_log off;
gzip_static on; # to serve pre-gzipped version
expires max;
add_header Cache-Control public;
# Some browsers still send conditional-GET requests if there's a
# Last-Modified header or an ETag header even if they haven't
# reached the expiry date sent in the Expires header.
add_header Last-Modified "";
add_header ETag "";
break;
}
That more or less come straight from the guide, and it works. However, now I'm noticing in my Thin logs entries like the following:
cache: [GET /] miss
cache: [GET /designs/victoria/images/gallery-3-zoom.png] miss, store
cache: [GET /blank.html] stale, invalid, store
cache: [GET /blank.html] stale, invalid, store
cache: [GET /robots.txt] stale, invalid, store
cache: [GET /parties/new] miss
There are a lot of these. Most are for /blank.html. Any asset requests are for un-pipelined assets. Some are URLs straight from my routes file. My questions:
- What are these "cache:" entries? I have never explicitly configured caching on this app.
- If my setup is misconfigured how should I correct?
- Why does blank.html get so many requests (what is blank.html?)?
Any insight is appreciated! Thank you.