Fragment Caching don’t work: “Unable to execute code: “
-
Hello! I’m trying to configure Fragment Caching, but it don’t working. I see this message: “Unable to execute code: The time is 13:27:38 <br>;”
I’m following this tutorial: https://www.justinsilver.com/technology/wordpress/w3-total-cache-fragment-caching-wordpress/
So, I’m using Page cache method Disk: Basic with Late initialization enabled. All other caches are disabled. Also, I added this
define( 'W3TC_DYNAMIC_SECURITY', md5( rand( 0, 999999 ) ) ); // random "secret"
to my wp-config.php file.
And here is my code, that I try exclude from cache (it is placed inside single.php file):
<!--mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> --> <?php echo 'The time is: '.date( 'H:i:s', time() )." <br>"; ?> <!--/mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> -->
Also I noticed, that this message: “Unable to execute code:” appears only on first page load. After that, page loads with same cached time: “The time is 13:27:38”
Any help will be appreciated.
- The topic ‘Fragment Caching don’t work: “Unable to execute code: “’ is closed to new replies.