Use ESI to show Adrotate Banners




Wordpress LScache Plugin: Use ESI to show Adrotate Banners

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hey Guys, We are currently using Adrotate to display user uploaded advertising banners (not adsence) Is there away to implement ESI so that on page load the website will display a new banner ad each time? (Meaning Adrotate banners will not be cached, but the rest of the page will.) The ESI feature works great if the ads are in a widget but not sure how to do it when its implemented into a page as a shortcode. If you have a better recommendation for a plugin that would do this better I would be happy to make the switch. The page I need help with: https://www.asbk.com.au If you are comfortable with doing some coding, you can turn the ad block into an ESI block using our API. Theres documentation on our wiki, including a few examples specific to implementing ESI. Hope this helps! I may have replied too quickly. I missed the part where you said you were using a short code from a plug-in. Your best bet would be to see if the Adrotate team can implement the ESI code I liked to in my previous message. Thank you for your reply, I will reach out to the plugin author to see if he will update the plugin with the code provided in your link. For now I have found a workaround: ? Downloaded a plugin that inserts widgets as a shortcode on pages. ? Using the adrotate widget feature and litespeeds widget ESI, I can set the TTL to be 0. ? Copy the widget shortcode and replace it where the old Adrotate shortcode was. Now I get a new ad on every page load. Nice work-around ? thanks for sharing! One more thought: You might not want to set the widget TTL to be 0. If its uncached, then every request to view a page with an ad on it will have to hit the backend in order to display the ad. Instead, you could set a very short TTL (say, 120 seconds), which would cache the ad briefly. If you have a busy site, this could save hundreds of requests from having to invoke PHP.



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



Reference