0

This is my nginx config:

proxy_cache_path  /tmp/nginxcache  levels=1:2  keys_zone=trycatchchris:10m max_size=1g inactive=1440m use_temp_path=off;

server {
    listen 3000;

    server_name trycatchchris.co.uk;
    root /var/www/html/public/;

    location / {
        proxy_pass http://localhost:3001/;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_cache trycatchchris;
        proxy_ignore_headers Cache-Control;
        proxy_cache_valid any 1440m;

        proxy_no_cache $cookie_nocache $arg_nocache;
        proxy_cache_bypass $cookie_nocache $arg_nocache;
        add_header X-Proxy-Cache $upstream_cache_status;
    }
}

How do I clear the cache?

I've already had a look at How to clear nginx cache and https://stackoverflow.com/questions/6236078/how-to-clear-the-cache-of-nginx (one points to the other) however there are numerous answers and the question / accepted answer relates to a historical bug - so not really a good reference.

0

https://stackoverflow.com/a/6896903/1663462

In my case:

find /tmp/nginxcache -type f -delete

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.