
Nginx ile cache yapmak isterseniz site nginx ayarları için
location / {
proxy_cache ghost_cache;
proxy_cache_valid 300m;
add_header X-Proxy-Cache $upstream_cache_status;
proxy_ignore_headers Cache-Control;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:2368;
}
location ^~ /ghost/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:2368;
}nginx.conf içinproxy_cache_path /path/to/cache levels=1:2 keys_zone=ghost_cache:75m max_size=512m inactive=$ proxy_cache_key "$scheme$request_method$host$request_uri"; proxy_cache_methods GET HEAD;ekleyerek hızlanmasını sağlayabilirsiniz ama her yazı eklediğinizde cacheyi silmeniz gerekiyor.