• Resolved anhelo

    (@anhelo)


    Hi, can somebody suggest me how to deal with two problems:
    1. My site is using transients in front-end. For example, I have one transient save for one day, which is included in sidebar. In landing page also I have set specific query in transient for one day which display custom posts by query.

    Problem is that these transients are cached and do not changes when transient ends. If I manually purge cache, when everything is okay for one day.

    2. My site is fully responsible, but I have included FB messenger which should change link according user is using desktop or mobile. To check this I’m using wp_is_mobile function, but it seems that this messenger button for mobile stil using desktop version.

    Greet plugin by the way ?? Waiting for a possible solutions ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • 1) It’s because your page is still under cached after the transients ended, you can set a lower TTL (Default Public Cache TTL) to match with transients expiration to make sure the page get fresh.

    2) You can turn ON LiteSpeed > Settings > Cache > Cache Mobile to separate mobile and desktop cache, but it’s better to detect the device type by JS on the frontend to keep one cache version.

    Thread Starter anhelo

    (@anhelo)

    Thanks Stanley for a replay.

    Okay, I will detect device by JS.

    So the only and the best way to keep transients not cache is to match transient expiration with TTL? Maybe there is a possibility to exclude these transients from being cached? Because in my landing page, I’m using just one transient and for this reason I have to set lower TTL for entire page.

    Hi @anhelo, please try to use our ESI feature for the transient rendering. Then you can just set a shorten TTL for that ESI.

    Thread Starter anhelo

    (@anhelo)

    @stanleylitespeed thank you. This solved mt problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to deal with WP transients and different links’ is closed to new replies.