Nástin možnosti řešení výjimek pro Nginx microcache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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