Skip to content

Instantly share code, notes, and snippets.

@skyred
Last active August 29, 2015 13:57
Show Gist options
  • Save skyred/9360580 to your computer and use it in GitHub Desktop.
Save skyred/9360580 to your computer and use it in GitHub Desktop.
Microcache config
fastcgi_cache_path /dev/shm/microcache levels=1:2 keys_zone=microcache:50M 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment