D
D
Denis2014-11-19 15:58:25
Nginx
Denis, 2014-11-19 15:58:25

nginx. How to disable admin caching?

Friends got tired out of the blue :-)

server {
    listen 80;
    server_name example.com;
    
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
expires 14d;
client_max_body_size 30m;
index index.php;
 
location ~ /admin/* {
       expires off;
       break;
    }

    location / {
        try_files $uri $uri/ /index.php?$uri&$args;
    }

    location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
  }

  location ~ /\.ht {
    deny all;
  }
}

How to disable admin caching?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2014-11-19
@merryjane

In the config you specified, caching at the nginx level does not appear anywhere.
If you are talking about the expires directive, then try setting it to a small value for the admin panel, for example 1.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question