• Resolved tranqdu

    (@tranqdu)


    i am having problem with litespeeds and polylang. when i enable both plugins. litespeed cache can not create cache on my home page. is there any way to solve this problem?

Viewing 15 replies - 1 through 15 (of 24 total)
  • Plugin Support litetim

    (@litetim)

    @tranqdu
    Please give more details about the issue. What do you mean “cannot create cache”
    And create a report and share the ID. This can be done from: LSC => Toolbox => Reports => click on “send to litespeed”

    Thread Starter tranqdu

    (@tranqdu)

    @litetim

    Website: https://wandleinwand.com
    LiteSpeed Cache version: 7.1
    Polylang version: 3.7.3
    Web server: OpenLiteSpeed
    When using Polylang with LiteSpeed Cache, the homepage (https://wandleinwand.com) is not being cached, while all other pages are cached normally.
    Header response on homepage shows:
    X-LiteSpeed-Cache: miss
    or sometimes X-LiteSpeed-Cache: no-cache.

    ID report : USMROWRZ

    Please advise how to make the homepage cacheable when Polylang is configured to hide the language slug for the default language. It seems LiteSpeed Cache cannot detect the language context on wandleinwand.com (without a /de/ or /en/ in the URL), so it doesnโ€™t create cache.

    Plugin Support litetim

    (@litetim)

    @tranqdu
    Thank you for info provided.

    My first thoughts are because of a plugin that disables cache on pages is used.

    Let’s start debugging
    1) In edit page make sure the page has NOT active Do not cache.
    2) Links are not added here: https://docs.litespeedtech.com/lscache/lscwp/cache/#do-not-cache-uris
    3) Enable Debug Log from https://docs.litespeedtech.com/lscache/lscwp/toolbox/#debug-log and set it to Advanced.
    Open incognito page and visit homepage
    Go back to LSC => Toolbox => Log view https://docs.litespeedtech.com/lscache/lscwp/toolbox/#log-view-tab and make sure Debug Log is selected.
    Search for ย ——POST HTTP/1.1 (HTTPS) / (homepage request) and there should say why is not cached.
    Example of what could be: โŒ forced no cache [reason] DONOTCACHEPAGE const.

    This article will help with enabling debug: https://docs.litespeedtech.com/lscache/lscwp/troubleshoot/#turn-on-the-debug-log

    • This reply was modified 1 year ago by litetim. Reason: extra data
    Thread Starter tranqdu

    (@tranqdu)

    @litetim

    i followed your instructions and it shows the logs : 

    05/29/25 19:10:21.357 [14.191.139.139:55756 1 IeV] [Core] CHK html bypass: miss footer const
    05/29/25 19:10:21.357 [14.191.139.139:55756 1 IeV] ๐Ÿ’ต not cacheable before ctrl finalize
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] [Router] get_role: administrator
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ”ฑ role in vary_group [group] 99
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ”ฑ show_admin_bar_front: true
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ”ฑ admin bar : true
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ”ฑ no custimzed vary
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ’ต โŒ forced no cache [reason] DONOTCACHEPAGE const
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ’ฐ X-LiteSpeed-Cache-Control: no-cache
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ’ฐ Cache-Control: no-cache, no-store, must-revalidate, max-age=0
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ”ฑ uid: 8
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ”ฑ role in vary_group [group] 99
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ”ฑ show_admin_bar_front: true
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] ๐Ÿ”ฑ admin bar : true
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] [footer comment]

    <!-- Page uncached by LiteSpeed Cache 7.1 on 2025-05-29 19:10:21 -->
    <!-- X-LiteSpeed-Cache-Control: no-cache -->
    <!-- Full varies: admin_bar:1;logged-in:1;role:99 -->
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] [Core] CHK html bypass: miss footer const
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] [Core] run hook litespeed_buffer_finalize
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] Response headers --- array (
    0 => 'X-Redirect-By: WordPress',
    1 => 'Location: https://wandleinwand.com/wp-admin/admin.php?page=litespeed-toolbox',
    2 => 'X-LiteSpeed-Cache-Control: no-cache',
    3 => 'Cache-Control: no-cache, no-store, must-revalidate, max-age=0',
    )
    05/29/25 19:10:21.358 [14.191.139.139:55756 1 IeV] End response
    --------------------------------------------------Duration: 172.25 ms------------------------------

    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] ๐Ÿ’“ ------GET HTTP/1.1 (HTTPS) /wp-admin/admin.php
    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] Query String: page=litespeed-toolbox
    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] HTTP_REFERER: https://wandleinwand.com/wp-admin/admin.php?page=lite...
    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit...
    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] Accept Encoding: gzip, br
    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] Cookie _lscache_vary: admin_bar:1;logged-in:1;role:99
    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] X-LSCACHE: true
    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] LSCACHE_VARY_COOKIE: pll_language,,wp-postpass_1087b1c562630b10ffdc185f85a60eb1
    05/29/25 19:10:21.633 [14.191.139.139:55756 1 XE7] [ESI] Overwrite wp_create_nonce()
    05/29/25 19:10:21.760 [14.191.139.139:55756 1 XE7] ๐Ÿ‘ฎ No cache due to Admin page
    05/29/25 19:10:21.786 [14.191.139.139:55756 1 XE7] [Media] init
    05/29/25 19:10:21.786 [14.191.139.139:55756 1 XE7] [LQIP] init
    05/29/25 19:10:21.786 [14.191.139.139:55756 1 XE7] [CDN] init
    05/29/25 19:10:21.786 [14.191.139.139:55756 1 XE7] [Router] CDN bypassed: is not ajax call
    05/29/25 19:10:21.786 [14.191.139.139:55756 1 XE7] [Router] CDN bypassed: ajax call from admin
    05/29/25 19:10:21.786 [14.191.139.139:55756 1 XE7] โฐ Init
    05/29/25 19:10:21.786 [14.191.139.139:55756 1 XE7] [Router] LSCWP_CTRL bypassed empty
    Plugin Support litetim

    (@litetim)

    Thank you about log but is not complete. ๐Ÿ™
    You can share full logs on: https://pastebin.ubuntu.com/ and paste the id only.

    Thank you ๐Ÿ™‚

    Thread Starter tranqdu

    (@tranqdu)

    @litetim

    please check for me here is the logs link : https://pastebin.ubuntu.com/p/hfS4F85jjP

    Plugin Support litetim

    (@litetim)

    @tranqdu please do not look for DONOTCACHEPAGE const
    The logs are still trimmed.


    Add this code in theme functions.php:
    add_filter('litespeed_debug_show_max_lines', 'lsc_log_change_lines');

    function lsc_log_change_lines(){return 10000; }


    will allow to see more lines.

    • This reply was modified 1 year ago by litetim.
    • This reply was modified 1 year ago by litetim.
    Thread Starter tranqdu

    (@tranqdu)

    @litetim

    I followed your instructions and got the result at the following link: https://pastebin.ubuntu.com/p/myvfHr45HP

    Plugin Support qtwrk

    (@qtwrk)

    please try this:

    debug log to ON

    debug level to advance

    debug include URI , add test

    clean up existing log

    then open page as https://wandleinwand.com/?test

    and share the log again

    Thread Starter tranqdu

    (@tranqdu)

    @qtwrk

    i did it your way. and here is the error log. is there really a way to fix this problem?

    link : https://pastebin.ubuntu.com/p/zz8hxdmpdr/

    Plugin Support qtwrk

    (@qtwrk)

    the log still not correct, please create a new report again , I will verify and double check your debug setting.

    Thread Starter tranqdu

    (@tranqdu)

    @qtwrk


    please check for me . i followed your instructions . link : https://pastebin.ubuntu.com/p/JGpSGJcYqC/

    Plugin Support qtwrk

    (@qtwrk)

    06/02/25 17:07:31.699 [14.191.139.182:52262 1 oTq] ๐Ÿ’ต โŒ forced no cache [reason] DONOTCACHEPAGE const
    06/02/25 17:07:31.699 [14.191.139.182:52262 1 oTq] ๐Ÿ’ฐ X-LiteSpeed-Cache-Control: no-cache,esi=on

    sorry for late response , it is indeed caused by that constant

    please try add_filter( 'litespeed_const_DONOTCACHEPAGE', '__return_false' );

    Thread Starter tranqdu

    (@tranqdu)

    @qtwrk

    Thanks. It’s working fine again.

    Plugin Support litetim

    (@litetim)

    @tranqdu that is a good fix from @qtwrk , your site will run good, but I would dig into why the constant is set.
    But I would look further into why the constant DONOTCACHEPAGE is set:
    – maybe page is removed from cache
    – maybe a plugin add the constant for homepage OR in some conditions

    If everything is ok, please set the topic Resolved. Thank you ๐Ÿ™‚

Viewing 15 replies - 1 through 15 (of 24 total)

The topic ‘litespeed cache conflict with polylang’ is closed to new replies.