Wordpress LScache Plugin: How to deal with WP transients and different links
Last Updated on: Wed, 15 Apr 2026 00:00:02 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 Im 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 1) Its 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 its better to detect the device type by JS on the frontend to keep one cache version. 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, Im 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. @stanleylitespeed thank you. This solved mt problem.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference