Welcome to Centmin Mod Community
Register Now

Xenforo Possible the fast_cgi cache on xenforo 2.1.x ?

Discussion in 'Forum software usage' started by negative, Feb 1, 2020.

  1. negative

    negative Active Member

    384
    46
    28
    Apr 11, 2015
    Ratings:
    +90
    Local Time:
    10:08 PM
    1.9.10
    10.1.11
  2. rdan

    rdan Well-Known Member

    4,939
    1,179
    113
    May 25, 2014
    Ratings:
    +1,785
    Local Time:
    3:08 AM
    Mainline
    10.2
  3. rdan

    rdan Well-Known Member

    4,939
    1,179
    113
    May 25, 2014
    Ratings:
    +1,785
    Local Time:
    3:08 AM
    Mainline
    10.2
    Untested but should work.
    Code:
    ### Start FastCGI Cache
    map $http_cookie $nocachecookie {
        default                    0;
        ~xf_user                   1;
        ~xf_style_id               1;
        ~xf_session_admin          1;
        ~xf_lscxf_logged_in        1;
    }
    map $request_uri $nocacheuri {
        default                 1;
        ~^/threads/             0;
        ~^/posts/               0;
        ~^/forums/              0;
        ~^/categories/          0;
        ~^/members/             0;
        ~^/pages/               0;
        ~^/attachments/         0;
        ~^/css.php              0;
        ~^/proxy.php            0;
        ~^/$                    0;
    }
    fastcgi_cache_path /var/run/nginx_fastcgi_cache levels=1:2 keys_zone=fastcgicache:512m inactive=30m;
    ### End FastCGI Cache
    
     
  4. negative

    negative Active Member

    384
    46
    28
    Apr 11, 2015
    Ratings:
    +90
    Local Time:
    10:08 PM
    1.9.10
    10.1.11
    I've clear the cached files but i see still some thread pages coming with dark style from cache!

    We didn't fix it so i go disable that caching method because of useless for me.
    Please note that, that fastcgi cache doesn't work on forums which including multi style i thought!