location / {
root /var/www/cache;
error_page 404 = @storage;
}
location @storage {
proxy_pass http://2ndserver;
proxy_store on;
proxy_store_access user:rw group:rw all:r;
proxy_temp_path /var/www/cachetmp
root /var/www/cache;
access_log off;
}