• Resolved derlehre

    (@derlehre)


    Hello Dear Masteriyo team

    In the documentation of Masteriyo is mentioned that the LSCache which is a server-level cache can cause problems for dynamic pages of the account and learn page and RestApi.

    I asked the support of the Litespeed cache plugin, amd they said that by Litespeed cache plugin, the pages can be excluded even from the server-level cache of LSCache.

    Could you please test it and guide me if it it’s possible to use Masteriyo on a host which is on litespeed webserver and LScache is on the server?

    • This topic was modified 2 weeks, 1 day ago by derlehre.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support sauravkhanal

    (@sauravkhanal)

    Hi @derlehre , thanks for reaching out and for checking with LiteSpeed support.

    Good news: Masteriyo already handles caching exclusions automatically for the account and learn pages. When LiteSpeed Cache is active, Masteriyo tells LiteSpeed not to cache the checkout, login, signup, lost-password, instructor-registration, learn, and account pages, so no configuration is needed for those.

    The one part that isn’t automatic yet is the REST API. LiteSpeed Cache has Cache REST API enabled by default, which can cache dynamic API responses related to progress, enrollment status, and other data. This can result in stale or inconsistent information.

    The exclusion LiteSpeed suggested is therefore the right approach. You can either:

    • Disable LiteSpeed Cache → Cache → Cache REST API, or
    • Add /wp-json/masteriyo/v1/ under LiteSpeed Cache → Cache → Excludes → Do Not Cache URIs.

    Either option is fine. Once this is configured, Masteriyo should work correctly with LiteSpeed Cache enabled. Let us know if you run into any issues afterward.

    Thread Starter derlehre

    (@derlehre)

    thank you dear @sauravkhanal

    I don’t understand the caching concept very well. That’s why I’m describing more. Because there are three things. The first one is the Light Speed Web Server. The second thing is LS Cache. And the third one is Light Speed Cache plugin.

    It means i can use Masteriyo Lms on a litespeed webserver and the server has LScache(server-level cache) on it?

    • This reply was modified 2 weeks, 1 day ago by derlehre.
    Thread Starter derlehre

    (@derlehre)

    Or i can use Masteriyo on a server which has ServerLevel LSCache without LitespeedcachePlugin?

    The plugin is needed only to turn off the restApi, otherwise, Masteriyo tell the ServerLevel Cache not to cache dynamic pages?

    Plugin Support sauravkhanal

    (@sauravkhanal)

    Good question. The short answer is yes, you’ll want the LiteSpeed Cache plugin installed.

    Let me clarify my earlier reply, because I made it sound like Masteriyo could handle this on its own. The automatic exclusions only work when the LiteSpeed Cache plugin is active. Masteriyo checks for the plugin and uses it to tell LiteSpeed which pages shouldn’t be cached. Without the plugin, Masteriyo has no way to communicate those exclusions to the server-level cache.

    The pages Masteriyo normally protects are:

    • Checkout
    • Sign-in / Sign-up
    • Lost password
    • Instructor registration
    • Account
    • Learn (course player)

    Without those exclusions, a cached page can serve a stale nonce, which may cause issues such as login cookie-check errors or checkout submissions failing.

    The plugin isn’t only needed for the REST API setting; it’s what makes the page exclusions work in the first place.

    I’d recommend installing and activating LiteSpeed Cache. You don’t need to enable its optimization features, and I’d leave CSS/JS minification off since Masteriyo already ships optimized assets.

    For the REST API, you can either:

    • Turn off Cache REST API, or
    • Add /wp-json/masteriyo/v1/ under Do Not Cache URIs.

    One extra note: if you’ve configured a Cart page, add that to the exclusions as well, since it isn’t part of Masteriyo’s automatic list.

    It’s possible to run without the plugin by adding the exclusions manually through .htaccess or your vhost configuration, but that would be a manual setup we’d be unable to verify or maintain from our side. So the LiteSpeed Cache plugin is the approach we’d recommend.

    Thread Starter derlehre

    (@derlehre)

    @sauravkhanal Hello dear

    I moved the website on a host which has litespeed webserver and also lscache on server. And installed the litespeed plugin and excluded Masteriyo pages and RestApi. Everything is working lightening fast. Thank you. I’m so happy to be able to run my website on a stronger host.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.