Questions on proper use of proxy_cache for Wordpress

I have a Wordpress blog I’d like to cache files for in the built-in
Nginx cache. I’m not completely sure what is cached, or even how to find
out. I have WP Super Cache that generates .html files, and I would like
to cache those files in Nginx for only 15 minutes. I would like to have
all of the other static files such as .css, .png, .gif, .js, etc.,
stored for 1 year, but I would like those files to be replaced if the
file changes. I’m not sure what else the Nginx cache stores, or what I
should do to limit the time on those stored items to make sure my blog
homepage refreshes every 15 minutes, since my understanding of this type
of cache is limited.

How can I configure the cache to minimize the impact on the CPU load,
but still get a refreshed homepage, and post pages, every 15 minutes?

Are the subdirectories that store the cached items deleted along with
the items? Are those subdirectories left empty, or are they reused for
new stored items after expired items are deleted?

I also could not find any information about “proxy_cache_key” in the
wiki. I only found information about “proxy_cache_key” in a response
from Igor on how to configure the cache.

In http:

proxy_cache_path /tmp/my_cache levels=1:2
keys_zone=my_cache:15m
inactive=15m max_size=200m;

In server:

location / {
proxy_pass http://127.0.0.1:8008;
proxy_cache my_cache;
proxy_cache_key $scheme$proxy_host$uri$is_args$args;
proxy_cache_use_stale error timeout invalid_header
updating http_500 http_502 http_503 http_504 http_404;
proxy_cache_methods POST;
proxy_cache_valid 15m;
break;
}

Posted at Nginx Forum:

Is there a way to exclude caching .html files? Is there also a way to
define the file types that are cashed, such as a list of the static
files?

Posted at Nginx Forum:

On Wed, Dec 9, 2009 at 4:35 AM, nerdgrind [email protected] wrote:

Is there a way to exclude caching .html files? Is there also a way to define the file types that are cashed, such as a list of the static files?

with location


O< ascii ribbon campaign - stop html mail - www.asciiribbon.org