• Resolved lordsnake

    (@lordsnake)


    Report number: FGKMATAK

    for some reaosn I am getting this recently.

    X-Litespeed-Cache-Control: no-cache

    caching is enabled and has always been enabled, no pages are being excluded, so I cannot see why caching has stopped working.

    I do however use cloudflare if that matters.
    Any ideas what the issue is?

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support qtwrk

    (@qtwrk)

    please try add this to your theme’s functions.php

    add_filter( 'litespeed_const_DONOTCACHEPAGE', '__return_false' );

    Thread Starter lordsnake

    (@lordsnake)

    won;t that just get overwritten when I update the theme?

    Thread Starter lordsnake

    (@lordsnake)

    I used a snippets plugin to insert the code instead, which seems to have fixed the issue, and the page is now cached.
    But I am concerned that this is a bit of a sledgehammer solution. It seems like this code is telling lscache to just ignore any/all do not cache instruction, so what if I actually do need to not cache a specific page ?

    Plugin Support qtwrk

    (@qtwrk)

    usually this should be done in child theme , you can use plugin like code snippet to add it as well.

    you can search DONOTCACHEPAGE through your other plugins , one of them is defining this constant that tells cache plugin don’t cache the page

    • This reply was modified 1 year ago by qtwrk.
    Thread Starter lordsnake

    (@lordsnake)

    yes I used a code snippet plugin as mentioned above.

    how do I search through plugins? do you mean search through the code of every single plugin?
    there are no other caching related plugins, so I don’t know how or why they would do this.

    Plugin Support qtwrk

    (@qtwrk)

    Yes ,like download the plugins directory to your local computer and do a text search in them

    I don’t know either, but if that code snippet works, that means something called this constant for whatever reason

    So quick solution, use this code to tell LSCWP not to honor it

    Deeper solution, find out what plugin did it or why did it

    Thread Starter lordsnake

    (@lordsnake)

    I have searched all plugins, and found it in my forminator plugin.
    this is set to not cache pages with forms on to avoid issues with dynamic forms.
    So this then gives another issue, if I disable that option, I have problems with forms not working properly.
    Is there any way round this?

    • This reply was modified 12 months ago by lordsnake.
    Plugin Support qtwrk

    (@qtwrk)

    but did that code snippet work ?

    if so , then definitely something is definig it , if not found , you can try the old fashion way , by disable plugins one by one , or disable them all and re-enable them one by one , to dig it out.

    Thread Starter lordsnake

    (@lordsnake)

    I edited my previous rpely as I found it

    Plugin Support qtwrk

    (@qtwrk)

    then I guess you need to stick with my code snippet

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘home page not being cached’ is closed to new replies.