• For example we use widgets for recently viewed items, new additions or products that are on sale. When page is cached it doesn’t get updated until the cache expires and it fetches it again, it loses utility, but still not a big deal.

    Other problem we face is that we serve few different regions and in order to determine what to show to the customer we save his shop preference in cookie. Of course with cache enabled the results vary and often wrong content is shown.

    Is there a way to only cache certain parts of the page or modify when cache is refreshed with code snippets or something? Or cache various version of a page and serve them depending on the cookie?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter victorove

    (@victorove)

    Edit. I tried to use cookie exclusion option, but it seems once you get the cookie cache stops working for that user.

    Please try enabling ESI.

    Thread Starter victorove

    (@victorove)

    Please try enabling ESI.

    Interesting, how does that work? Is there any tutorial with explanations how to build example site?

    Right now I am looking into “Cookies That Indicate Variations”, seems it will be better solution for us. For dynamic caching we would only need to cache the widget, nothing else.

    Are you affiliated with LiteSpeed? Is there any plugin for variations based on cookies or we would have to develop one from scratch?

    Thread Starter victorove

    (@victorove)

    Actually was easier than I thought. Once ESI is enabled you can set caching options directly from widget options.

    For cookie based content I added rewrite rule in .htaccess as per documentation and it seems to be working.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Any recommendations to make LS Cache work with dynamic content?’ is closed to new replies.