Commit 471212b2 authored by anarcat's avatar anarcat

remove fastcgi caching

parent 374bf8f4
......@@ -7,13 +7,6 @@
## Default index files
index index.php index.html;
## FastCGI Caching
fastcgi_cache_path /var/lib/nginx/speed
levels=2:2:2
keys_zone=speed:10m
inactive=15m
max_size=3g;
## General Options
ignore_invalid_headers on;
<?php
......
......@@ -57,34 +57,8 @@ else {
location = /index.php {
add_header X-Engine "Aegir";
add_header X-Device "$device";
add_header X-Speed-Cache "$upstream_cache_status";
add_header X-Speed-Cache-UID "$cache_uid";
add_header X-Speed-Cache-Key "$key_uri";
add_header X-NoCache "$nocache_details";
add_header X-This-Proto "$http_x_forwarded_proto";
add_header X-Server-Name "$server_name";
###
### Use Nginx cache for all visitors.
###
set $nocache "";
if ( $nocache_details ~ (?:OctopusNCookie|Args|Skip) ) {
set $nocache "NoCache";
}
fastcgi_cache speed;
fastcgi_cache_methods GET HEAD; ### Nginx default, but added for clarity
fastcgi_cache_min_uses 1;
fastcgi_cache_key "$is_bot$device$host$request_method$key_uri$cache_uid$http_x_forwarded_proto$cookie_respimg";
fastcgi_cache_valid 200 10s;
fastcgi_cache_valid 302 1m;
fastcgi_cache_valid 301 403 404 5s;
fastcgi_cache_valid 500 502 503 504 1s;
fastcgi_ignore_headers Cache-Control Expires;
fastcgi_pass_header Set-Cookie;
fastcgi_pass_header X-Accel-Expires;
fastcgi_pass_header X-Accel-Redirect;
fastcgi_no_cache $cookie_OctopusNoCacheID $http_authorization $http_pragma $nocache;
fastcgi_cache_bypass $cookie_OctopusNoCacheID $http_authorization $http_pragma $nocache;
fastcgi_cache_use_stale error http_500 http_503 invalid_header timeout updating;
try_files $uri =404; ### check for existence of php file first
fastcgi_pass 127.0.0.1:9000;
<?php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment