21 days later

Have you ever tested this extension on the newest version Flarum?
Errr……As I update to newest Flarum version 1.3.1, it seemed that this extension doesn't work.
I could see x-litespeed-cache:hit in the response header, but it takes more time to load the page than usual.I test many times at the same time.But the averaging TTFB sometimes is up to 3-4s, maybe the LiteSpeed doesn't cache page?

    luji464651 Have you ever tested this extension on the newest version Flarum?

    Yes, it works on my forum.


    It looks like a server problem. Can you give me a link to your site?

    luji464651 Have you ever tested this extension on the newest version Flarum?

    Yes, using it here and working fine.

    14 days later

    I find openlitespeed has some limit.So I use nginx now.Can write a extengion to add cookie for nginx cache

      JohnP My work is use wordpress to builder web.I find some issue with brizy builder.And openlitespeed is install difficult in debian 11 or ubuntu 22.04.Now I switch to nginx and php8.1.Performance is so good

      a month later

      djemyjenab This is a third-party script from an advertising company. They on their side configure where to insert ads.
      So no extension is needed. But unfortunately, ads controlled by an external script cause layout shifts because they are inserted after the page is rendered.

      3 months later
      • [deleted]

      It is possible that this extension sometimes prevents login (when trying to log in when reading/accessing specific discussion).

      Can someone check are these.htaccesssettings correct:

      <IfModule LiteSpeed>
          CacheLookup on
          RewriteEngine On
          RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
          # Detection of logged-in user.
          RewriteRule .* - [E="Cache-Vary:flarum_remember,flarum_lscache_vary,locale"]
          # If you have a non-default path to the admin panel, change "admin" to match.
          RewriteCond %{ORG_REQ_URI} !/admin
          # Enable private cache for admin panel. If it causes problems replace "private" with "no-cache".
          RewriteRule .* - [E=Cache-Control:private]
      </IfModule>
        5 months later

        [deleted] Sorry for the late reply. Are you still having this problem?
        When you log in and the page refreshes, you are still not logged in? If so, there is some problem with vary cookies.

        10 days later

        All good except that logged user still sees cached home page or cached version of whichever page they landed on.
        Unless they refresh page 2-3 times, they dont see themselves logged in (or go to that page and login again).
        If this extension does not cache for logged in users, then cache should be disabled once a user logs in. For guests and bots it works fine

          wbntff The page should not be cached for logged-in users. This extension adds the right headers, but I guess there is some race condition and that's why some people have this problem. Can you try adding this code to .htaccess?

          <IfModule LiteSpeed>
              CacheLookup on
              RewriteEngine On
              RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
              # Detection of logged-in user.
              RewriteRule .* - [E="Cache-Vary:flarum_remember,flarum_lscache_vary,locale"]
          </IfModule>

            rafaucau Yes its working but still home and few pages are served cached for logged in users.
            I tested with admin and another user account.
            I could login as admin and after logout, another user account gets cached page served .
            I have to wait for few minutes and login with another account or go to any topic and refresh page 2-3 times to see myself logged in with 2nd account.

              wbntff Yes its working but still home and few pages are served cached for logged in users.
              I tested with admin and another user account.

              So it's not working as it was intended.
              Did you clear the LSCache after updating the .htaccess?
              Can you give a link to your forum and the result of the php flarum info command?

                14 days later

                No matter what setting is applied, users still see cached pages and are forced to refresh multiple times to see themselves logged it.

                What is the proper way to remove this extension along with database settings and purge all cached pages

                  wbntff Without the information I previously asked for (rafaucau), I'm unable to assist you. To uninstall the extension, clear the LSCache in the admin panel, remove the code you added in the .htaccess file while configuring this extension, disable the extension, and click "Purge" in the upper right corner of the extension settings.