Title: Cache PHP Resources won&#8217;t work
Last modified: May 8, 2020

---

# Cache PHP Resources won’t work

 *  Resolved [tomalaki](https://wordpress.org/support/users/tomalaki/)
 * (@tomalaki)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-php-resources-wont-work/)
 * Hi,
    I wrote a php script in my theme that apply “dark” class in body between
   time 22 until 6am. I set Cache PHP Resources off but when litecache is active,
   it won’t work. It work perfectly when litecache if inactive. What is the problem?
   Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-php-resources-wont-work/#post-12803176)
 * Hi,
 * That’s probably due to main page is cached already , so your PHP won’t be executed
 * Please consider make your PHP script to be [ESI block](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:esi_block)
 * Best regards,
 *  Thread Starter [tomalaki](https://wordpress.org/support/users/tomalaki/)
 * (@tomalaki)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-php-resources-wont-work/#post-12804563)
 * Thank you. And just a small thing, how to remove this?
    <!– Block uncached by
   LiteSpeed Cache 3.0.8.6 on 2020-05-09 04:30:25 –> It comes in my css class name
   and I don’t want put body in block
 *  Thread Starter [tomalaki](https://wordpress.org/support/users/tomalaki/)
 * (@tomalaki)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cache-php-resources-wont-work/#post-12806164)
 * > Thank you. And just a small thing, how to remove this?
   >  <!– Block uncached 
   > by LiteSpeed Cache 3.0.8.6 on 2020-05-09 04:30:25 –> It comes in my css class
   > name and I don’t want put body in block
 * Well, I changed line 511 in core.cls.php to ”.
    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cache PHP Resources won’t work’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [tomalaki](https://wordpress.org/support/users/tomalaki/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/cache-php-resources-wont-work/#post-12806164)
 * Status: resolved