Want to subscribe to topics you're interested in?
Become a Member

Xenforo Fastcgi cache configuration for Xenforo?

Discussion in 'Forum software usage' started by Everlind, Jun 17, 2014.

  1. rdan

    rdan Well-Known Member

    4,547
    1,089
    113
    May 25, 2014
    Ratings:
    +1,590
    Local Time:
    3:50 AM
    Mainline
    10.2
    He didn't implemented it here :(
     
  2. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:50 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yeah not running fastcgi_cache on this forum :)
     
    • Like Like x 1
  3. hungphutho

    hungphutho Member

    55
    35
    18
    Jun 2, 2014
    Ratings:
    +35
    Local Time:
    2:50 AM
    1.7.2
    Percona 5.6
    add xf_style_id=xx|xf_style_id=xx
    Code:
    # Don't use the cache for logged in users and Don't use the cache for guest change style
        if ($http_cookie ~* "xf_session_admin|xf_user|xf_user_admin|xf_style_id=xx|xf_style_id=xx") {
            set $no_cache 1;
        }
     
    • Like Like x 1
  4. rdan

    rdan Well-Known Member

    4,547
    1,089
    113
    May 25, 2014
    Ratings:
    +1,590
    Local Time:
    3:50 AM
    Mainline
    10.2
    I don't really know what Floren mean here :(
    Nginx Fastcgi_cache configuration for Xenforo Board | XenForo Community
     
  5. rdan

    rdan Well-Known Member

    4,547
    1,089
    113
    May 25, 2014
    Ratings:
    +1,590
    Local Time:
    3:50 AM
    Mainline
    10.2
    @hungphutho
    I have this problem now:
    What is your solution for this issue?
     
  6. Floren

    Floren Active Member

    148
    77
    28
    Jun 6, 2014
    Ratings:
    +77
    Local Time:
    3:50 PM
    @RoldanLT has a tendency to ask things on 200 forums, except AXIVO. :D
    I told him exactly what to do, but instead of following my advice, he posts things all over the places "hoping" it will work.
     
  7. hungphutho

    hungphutho Member

    55
    35
    18
    Jun 2, 2014
    Ratings:
    +35
    Local Time:
    2:50 AM
    1.7.2
    Percona 5.6
    • Like Like x 1
  8. rdan

    rdan Well-Known Member

    4,547
    1,089
    113
    May 25, 2014
    Ratings:
    +1,590
    Local Time:
    3:50 AM
    Mainline
    10.2
    • Like Like x 1
  9. pamamolf

    pamamolf Premium Member Premium Member

    3,310
    318
    83
    May 31, 2014
    Ratings:
    +589
    Local Time:
    10:50 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Is it possible to use fast cgi cache path to a tmpfs partition without doing the trick for guests ?

    And it will really help or it is only for the trick with the guests?
     
  10. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:50 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    what do you mean tricks for guests ? fastcgi_cache is predominantly only used for caching for guests never logged in users - same goes for wordpress and fastcgi_cache - guests only
     
    • Agree Agree x 1
  11. pamamolf

    pamamolf Premium Member Premium Member

    3,310
    318
    83
    May 31, 2014
    Ratings:
    +589
    Local Time:
    10:50 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    It works only if you do the cookie trick for guests or it works in general for guests without any cookie settings?
     
  12. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:50 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Every web/php app will need some form of cookie manipulation and/or understanding of that web/php app's cookie/session functionality to properly implement fastcgi_cache for nginx/php-fpm. It's one reason I can implememt fastcgi_cache for wordpress and just a bit off and not able to for xenforo as I know wordpress well and xenforo not as well. Hence, why fastcgi_cache is left to end users to do as it requires an understanding of the web/php app itself to properly implement. It's same for Varnish Cache too, understanding the web/php app is important - especially for how the web/php app deals and uses cookies/sessions for guests and non-guests.
     
  13. nfn

    nfn New Member

    20
    0
    1
    Jun 28, 2015
    Ratings:
    +4
    Local Time:
    8:50 PM
    Hi,

    I just register here today.
    I came from IPB, just mover last weekend to XF and I'm loving this :)

    in IPB I use this same technic to cache pages for guest, but with xf I don't see xf_user or xf_user_admin in my headers,
    Do theses cookies still exists in XF1.4?

    I only see xf_session_admin and xf_session

    Thanks
     
  14. rdan

    rdan Well-Known Member

    4,547
    1,089
    113
    May 25, 2014
    Ratings:
    +1,590
    Local Time:
    3:50 AM
    Mainline
    10.2
    Stay logged in, must be checked always and hidden so that xf_user cookies will be available.
     
  15. rdan

    rdan Well-Known Member

    4,547
    1,089
    113
    May 25, 2014
    Ratings:
    +1,590
    Local Time:
    3:50 AM
    Mainline
    10.2
  16. rdan

    rdan Well-Known Member

    4,547
    1,089
    113
    May 25, 2014
    Ratings:
    +1,590
    Local Time:
    3:50 AM
    Mainline
    10.2
  17. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:50 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    • Informative Informative x 2
    • Like Like x 1
  18. negative

    negative Active Member

    292
    30
    28
    Apr 11, 2015
    Ratings:
    +64
    Local Time:
    10:50 PM
    1.9.10
    10.1.11
    @rdan @eva2000

    How can we exclude the forum homepage or set different cache time ?
    Thanks
     
  19. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:50 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    If you're not familar with fastcgi_cache, I would use a different caching method as fastcgi_cache is left to end user to customise. Though excluding home page location context / is difficult as is due to location match.

    As to changing time it's in fastcgi_cache_valid Module ngx_http_fastcgi_module
     
  20. negative

    negative Active Member

    292
    30
    28
    Apr 11, 2015
    Ratings:
    +64
    Local Time:
    10:50 PM
    1.9.10
    10.1.11
    One way is exclude the homepage i though but i didn't

    Actually, my forum installed on /forum/ directory and i've tried the exclude /forum/, /forum or like /forum/index.php but it didn't, it exludes all forum and sub pages.

    What are u using on that forum @eva2000 ? Only nginx pagespeed or what?
     
..