nginx caching ajax how to

Discussion in 'Nginx' started by wkharrat, Apr 12, 2017.

  1. #2
    Hi,
    nginx wont cache ajax get query, if a take request from inspector and paste it in adress bar, he cache it
    i have these in nginx conf :

    proxy_cache_key "$host$request_uri";
    proxy_ignore_headers Cache-Control Expires Set-Cookie ;
    proxy_cache_methods GET HEAD ;
    proxy_cache_valid 200 15m;
    ajax is alaways miss, direct request is cached

    Regardas

    Walid
     
    wkharrat, Apr 12, 2017 IP