fa71c7a216
git-svn-id: http://plugins.svn.wordpress.org/wp-ffpc/trunk@684134 b8457f37-d9ea-0310-8a92-e5e31aec5664
51 lines
926 B
Text
51 lines
926 B
Text
http {
|
|
...
|
|
upstream memcached-servers {
|
|
MEMCACHED_SERVERS
|
|
}
|
|
...
|
|
server {
|
|
...
|
|
|
|
# try to get result from memcached
|
|
location @memcached {
|
|
default_type text/html;
|
|
set $memcached_key DATAPREFIX$scheme://$host$request_uri;
|
|
set $memcached_request 1;
|
|
|
|
# exceptions
|
|
# avoid cache serve of POST requests
|
|
if ($request_method = POST ) {
|
|
set $memcached_request 0;
|
|
}
|
|
|
|
# avoid cache serve of wp-admin-like pages, starting with "wp-"
|
|
if ( $uri ~ "/wp-" ) {
|
|
set $memcached_request 0;
|
|
}
|
|
|
|
LOGGEDIN_EXCEPTION
|
|
|
|
if ( $memcached_request = 1) {
|
|
memcached_pass memcached-servers;
|
|
error_page 404 = @rewrites;
|
|
}
|
|
|
|
if ( $memcached_request = 0) {
|
|
rewrite ^ /index.php$request_uri last;
|
|
}
|
|
}
|
|
|
|
## rewrite rules
|
|
location @rewrites {
|
|
rewrite ^ /index.php$request_uri last;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ @memcached;
|
|
}
|
|
|
|
...
|
|
}
|
|
}
|
|
...
|