spiritedmedia / systems

Code and documentation for building, deploying, and serving code.
1 stars 1 forks source link

Modify Redis Page Caching Configs #20

Closed kingkool68 closed 7 years ago

kingkool68 commented 7 years ago

Copy redis-php7.conf to redis-php7-modified.conf

Comment out skipping caching of requests with query strings:

#if ($query_string != "") {
#  set $skip_cache 1;
#}

Remove xmlrpc.php and /feed/ from the regex to check if we skip cache. We want requests to feeds to be cached.

if ($request_uri ~* "(/wp-admin/|wp-.*.php|index.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
  set $skip_cache 1;
}

Make sure we're including our new modified conf file in `/etc/nginx/sites-available/spiritedmedia.com`

include common/redis-php7-modified.conf;