pragma / caching not functioning?
October 05, 2013 05:27PM
i am using nginx v.1.4.2 here and have noticed that the caching settings i have added to my site's config file appear to not be causing any caching to occur.

i have the following text in my site's file:

location ~* \.(css|js|html|htm)$ {
expires max;
gzip_static on;
log_not_found off;
add_header Pragma "public";
add_header Cache-Control "public";
}
location ~* \.(jpg|jpeg|gif|png|mp3|flv|mov|avi|3pg|swf|ico|woff|cur|htc|webm)$ {
expires max;
gzip_static off;
log_not_found off;
add_header Pragma "public";
add_header Cache-Control "public";
}

and also this in the main nginx.conf file:

open_file_cache max=1000 inactive=20s;
open_file_cache_valid 12h;
open_file_cache_min_uses 2;
open_file_cache_errors off;
keepalive_requests 100000;

when i view my site using pingdom tools' analysis methods (http://tools.pingdom.com/fpt/)
i see that the images and other files are listed with pragma and cache-control being 'no-cache'.

anyone know why this is?
am i correct in thinking that if pingdom tools shows 'no-cache' that the files are not being cached and therefore i need to change a code somewhere to improve the performance of my site?

thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 98
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready