Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nástin možnosti řešení výjimek pro Nginx microcache
set $no_cache "";
if ($request_method !~ ^(GET|HEAD)$) {
set $no_cache "1";
}
if ($http_cookie ~* "nocache") {
set $no_cache "1";
}
fastcgi_cache microcache;
fastcgi_cache_key $request_method|$host|$request_uri;
fastcgi_cache_valid 404 15s;
fastcgi_cache_valid any 2m;
fastcgi_no_cache $no_cache;
fastcgi_cache_bypass $no_cache;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment