Welcome! Log In Create A New Profile

Advanced

questions on proper use of proxy_cache for Wordpress

December 08, 2009 04:05PM
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:

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

In server:

[code]
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;
}
[/code]
Subject Author Posted

questions on proper use of proxy_cache for Wordpress

nerdgrind December 08, 2009 04:05PM

Re: questions on proper use of proxy_cache for Wordpress

nerdgrind December 08, 2009 04:35PM

Re: questions on proper use of proxy_cache for Wordpress

edogawaconan December 08, 2009 09:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 301
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready