Skip to content

Instantly share code, notes, and snippets.

@perusio
Created November 9, 2011 10:34
Show Gist options
  • Save perusio/1351069 to your computer and use it in GitHub Desktop.
Save perusio/1351069 to your computer and use it in GitHub Desktop.
map $request_uri $cache_valitidy {
default 5m;
~this-regex-uri 2h;
}
## Then do like this in the cache definition:
proxy_cache_valid 200 301 $cache_validity;
## For fastcgi cache.
fastcgi_cache_valid 200 301 $cache_validity;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment