• Resolved t0t0r0555

    (@t0t0r0555)


    Hi. I’m using this plugin with LSCache. Unfortunately, the calendar in my site won’t update automatically. I had to purge the page in order for it to display correctly. How do I exclude the calendar from being cached? There’s an option in LSCache to exclude query string from being cached but I don’t know what the string is.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author room34

    (@room34)

    Does the caching plugin have an option to exclude specific URLs, not just query strings? You may need to exclude the page the calendar is on. You might also want to see if the caching plugin lets you set the duration of the cache, and shorten the time it keeps cached data.

    One other thing that might help is to turn off the caching built into ICS Calendar, since it’s not needed when you’re using a separate caching plugin. Add reload="1" to your ICS Calendar shortcode to turn off its cache.

    Thread Starter t0t0r0555

    (@t0t0r0555)

    Yes, it can exclude specific URL as well but I don’t want to do that because there are other static elements that I want the plugin to cache on that same page. I will try the reload="1" first then.

    Plugin Author room34

    (@room34)

    Please do let me know if this resolves the issue or not. If it doesn’t, the only other solution I can think of would be to have ICS Calendar generate all of its output with JavaScript/AJAX instead. It would probably work, but it would be a fair bit of effort to get it to do that instead of outputting HTML directly as it does now. So far I have not heard about a lot of major issues between ICS Calendar and caching plugins, but it all depends on how frequently your calendar updates.

    Thread Starter t0t0r0555

    (@t0t0r0555)

    Wow, that sounds scary.. I hope I don’t need to do that. My calendar is very packed, every day has multiple events and sometimes changes (more event added). It looks like this and this.

    I’ve put the code and will update you in 17 hours (when new day starts). Fingers crossed it works… :/

    Plugin Author room34

    (@room34)

    Don’t worry, I’d be the one who would have to do it. ?? You would just need to add something like ajax="true" to your shortcode. But that won’t do anything at this point. I look forward to hearing if the previous suggestion works for you.

    Thread Starter t0t0r0555

    (@t0t0r0555)

    Hi again. Unfortunately, reload="1" doesn’t work. ??

    Plugin Author room34

    (@room34)

    OK, thanks for letting me know. I’ll do a bit more research and see if I can come up with anything else. In the meantime you might need to disable caching on the page the calendar is on, although I know that’s not ideal.

    Thread Starter t0t0r0555

    (@t0t0r0555)

    Okay. I’ll thoroughly test my cache settings in the mean time I guess…

    Plugin Author room34

    (@room34)

    You may want to have a look at this:

    https://docs.litespeedtech.com/lscache/lscwp/admin/#turning-wordpress-shortcodes-into-esi-blocks

    I think ESI blocks may be the key to getting LiteSpeed Cache to work with ICS Calendar. The example use case they give for this is even a calendar.

    Thread Starter t0t0r0555

    (@t0t0r0555)

    Doesn’t work… it makes the shortcode not working. This is the live view:
    https://i.imgur.com/T9T4wW9.png

    Plugin Author room34

    (@room34)

    Ah, sorry… I missed one step. I think you need to manually turn on ESI in your LiteSpeed settings first. Go to LiteSpeed Cache > Cache > [5] ESI and switch Enable ESI to “ON”. Then click Save Changes.

    On my test site I am also getting this warning from LiteSpeed:

    To use the caching functions you must have a LiteSpeed web server or be using QUIC.cloud CDN.

    So if your site is not using one of these, this feature probably won’t work.

    • This reply was modified 3 years, 3 months ago by room34.
    Thread Starter t0t0r0555

    (@t0t0r0555)

    Yes, I already turned it on LiteSpeed Cache > Cache > [5] ESI and is using LiteSpeed web server. Do I need to create a hook too? That part I don’t understand

    Plugin Author room34

    (@room34)

    I’m not sure. I don’t use this plugin so I’m not familiar with how it works… I just found this in the documentation. You might want to try posting about this on their support page.

    Thread Starter t0t0r0555

    (@t0t0r0555)

    Hi. I’ve been contacting LSCache support this past few days and happy to inform that my issue has been solved.

    You’re right, @room34 , I need to use the ESI… but it turns out that there’s a known issue with LSCache + Elementor that makes ESI doesn’t work.

    I’m linking the topic here in case anybody having the same issue as me.

    Thank you for lending your time trying to help me solve this issue, @room34 ??

    Plugin Author room34

    (@room34)

    Thanks for the update! I hope you’re able to find a resolution.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How to exclude the calendar from being cached??’ is closed to new replies.