Exclude A Plugin From Cache




Wordpress LScache Plugin: Exclude A Plugin From Cache

Last Updated on: Wed, 15 Apr 2026 00:00:02
Is there a way to exclude a plugin from cache? Hi, Sadly no , this is a page-based plugin , you can do things on page-basis , not other way around Best regards, That plugin will count visitors to every post on my site, then will display it based on the order of the most viewed posts. Therefore, it is not possible to exclude cache in all posts Is there any other way? Hi, there was another user who got similar issue https://wordpress.org/support/topic/wp-post-views-and-litespeed/#post-14388659 I dont know how was your post view created , you can either : follow that example to make it ESI block , or use some post counter with ajax call , ajax call wont be cached Best regards, Thank you Actually the plugin is already using ajax and the counter is working fine at back end, the problem is, the display order of the most popular posts and the views count at front end is not updated in real time according to the one on the backend on my site, and I suspect this is because of the cache. Hi, no , I mean , use the one loads in ajax call for front-end counter from your descripted , its like it is counting with ajax call for backend , but doesnt display it in ajax call for front otherwise , please try wrap it ESI block Best regards, otherwise , please try wrap it ESI block Sorry, how to wrap it ESI block? There is some quick code examples and a document link in other topic, but I will post it here again https://docs.litespeedtech.com/lscache/lscwp/api/#generate-esi-block-url It will require certain code though I dont really understand programming, can you please describe the steps more easily here? I place the block using Elementor plugins. Thank you very much how did it add it ? Whats the plugin you used? I used elementor pro to display the Post widget, then I installed the Advanced Post Queries plugin and WP-PostViews. The next step, you can follow this tutorial. Thank you Hi, okay I see , its from Elementor component , as unfortunate as it is but there is no way to convert page-builders component into ESI block the post view will still be updated in background , just wont reflect the view number in real time a workaround I can suggest is set page cache TTL to shorter time , so the view count will update quicker and sooner. Best regards, Ok, thank you very much



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



Reference