I previously wrote an article to explain how the fragment caching in W3 Total Cache plugin for WordPress works.

With their release of 0.9.2.10 the fragment caching suddenly stopped working and they stated in their release notes that a new security string/constant named W3TC_DYNAMIC_SECURITY is required in order for it to work. They implemented this as a security precaution.

The solution was posted on the WordPress.org support forums.

Here is a new example of how to use fragment caching in W3TC to show dynamic content:

<?php if (!defined('W3TC_DYNAMIC_SECURITY')) { define('W3TC_DYNAMIC_SECURITY', md5(rand(0,999))); } ?>

<!--mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> echo 'My PHP Code'; -->
<?php echo 'My PHP Code'; ?>
<!--/mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> -->