Last active
December 19, 2015 18:48
-
-
Save sanguis/6000876 to your computer and use it in GitHub Desktop.
nginx microcaching drupal
This file contains hidden or 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
fastcgi_cache_path /dev/shm/microcache levels=1:2 keys_zone=microcache:5M max_size=1G inactive=2h; | |
map $http_cookie $cache_uid { | |
default nil; # hommage to Lisp :) | |
~SESS[[:alnum:]]+=(?<session_id>[[:alnum:]]+) $session_id; | |
} | |
map $request_method $no_cache { | |
default 1; | |
HEAD 0; | |
GET 0; | |
} | |
client_max_body_size 10M; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment