<div dir="ltr"><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif">Thanks Steve for the reply!!<br><br></span></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif">Ok, so tell me if I understood correcty. You just have in your "vhost" server block this:<br>

fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:10m max_size=1000m inactive=60m;<br><br></span></div><div class="gmail_default" style="font-family:georgia,serif"><span style="font-family:arial,helvetica,sans-serif">and then you have a file /etc/nginx/microcache with<br>

<br></span><pre><span style="font-family:arial,helvetica,sans-serif">#        Setup var defaults
        set $no_cache "";
        # If non GET/HEAD, don't cache & mark user as uncacheable for 1 second
via cookie
        if ($request_method !~ ^(GET|HEAD)$) {
                set $no_cache "1";
        }
#       Drop no cache cookie if need be
#       (for some reason, add_header fails if included in prior if-block)
        if ($no_cache = "1") {
                add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
                add_header X-Microcachable "0";
        }
#       Bypass cache if no-cache cookie is set
        if ($http_cookie ~* "_mcnc") {
                set $no_cache "1";
        }

#       Bypass cache if flag is set
        fastcgi_no_cache $no_cache;
        fastcgi_cache_bypass $no_cache;
        fastcgi_cache microcache;
        fastcgi_cache_key  "$scheme$request_method$host$request_uri
$http_if_modified_since$http_if_none_match";
        fastcgi_cache_valid 404 30m;
        fastcgi_cache_valid 200 10s;
        fastcgi_max_temp_file_size 1M;
        fastcgi_cache_use_stale updating;
        fastcgi_pass_header Set-Cookie;
        fastcgi_pass_header Cookie;
        fastcgi_ignore_headers Cache-Control Expires Set-Cookie;<br><br></span></pre><pre><span style="font-family:arial,helvetica,sans-serif">.. correct?<br></span></pre><b></b></div></div>