LScache and adrotate




Wordpress LScache Plugin: LScache and adrotate

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello, Does anyone have an solution for support adrotate plugin ? Actually lscache doesnt support adrotate :(. Hi! I actually use LSCache and AdRotate together on my personal blog. The trick is to use ESI for the ad blocks. This is easy, assuming youre using widgets to display the ads. First, turn on ESI: Navigate to LiteSpeed Cache > Settings > ESI and set Enable ESI to ON. Then, make your ad widgets ESI-enabled: Navigate to Appearance > Widgets and view one of your AdRotate widgets. Set Enable ESI to Public and Widget Cache TTL to a number of seconds that you want it to be cached. I have mine set to 600, which means the ads stay the same for 10 minutes at a time, but I can live with that. If you have more traffic and want them to rotate more quickly, you can knock that number down lower. Repeat for all of your AdRotate widgets. If you want to know more about ESI, you can check out this blog post. Essentially, though, ESI allows you to punch a hole in a cached page, and treat that hole differently. In your case, you still want the hole in public cache, but you want it to be cached for far less time than the rest of the page. Let us know if you have any questions!



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference