v3.1 : how to make sure LSCWP ESI is on




Wordpress LScache Plugin: v3.1 : how to make sure LSCWP ESI is on

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi! What do I have to replace this with in v3.1 (this doesnt seems to work anymore) : if( method_exists( LiteSpeed_Cache_API, esi_enabled ) && LiteSpeed_Cache_API::esi_enabled() ) // To make sure is using the compatible API version if ( method_exists( LiteSpeed_Cache_API, v ) && LiteSpeed_Cache_API::v( 1.3 ) ) I tried to use this : $esi_status = apply_filters( litespeed_esi_status ) But Im having a fatal error? thanks! ps : I emplemented this : echo apply_filters( litespeed_esi_url, my_esi_block) And it works. But I need to use a condition in case ESi shutt down? Hi, Have you checked this page ? Best regards, Hi thanks for your response! Yes I have? and thass where I found this line : $esi_status = apply_filters( litespeed_esi_status ) (with the right quote symbol?) as I wrote in my previous post. But as I said : as soon as i put this line in my code to get $esi_statut? the server fail? In my mind I would do something like this : $esi_status = apply_filters( litespeed_esi_status ) if ($esi_status === ???(I dont knwon)) echo apply_filters( litespeed_esi_url, my_esi_block) else retrieve data from DB And as I said, everything works except that I cannot obtain $esi_status? FYI : The function in which the above code is triggered via an ajax call? and then I do something like this in my functions.php: add_action( litespeed_esi_load-my_esi_block, my_esi_block_esi_load ) function my_esi_block_esi_load() do_action( litespeed_control_set_ttl, 300 ) #do_action( litespeed_control_set_nocache ) echo Hello world .rand (1,99999) And its OKAY? except that I dont have the esi statut to implement the if statement? thx Sorry but this : $esi_status = apply_filters( litespeed_esi_status ) means nothing to me. And neither to WordPress : Fatal error: Uncaught ArgumentCountError: Too few arguments to function apply_filters() So? it must seem obvious to you but not to me? And to tell the truth I start to be desperate after 3 days ? Apologize for the typo there. Please use apply_filters( litespeed_esi_status, false ) . We will correct the API doc soon. Thanks!



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



Reference