Skip to content

Instantly share code, notes, and snippets.

@WordPress-Handbuch
Last active March 7, 2019 07:38
Show Gist options
  • Save WordPress-Handbuch/a101c54fd94af1a3d6a6e68fcc6c7dc9 to your computer and use it in GitHub Desktop.
Save WordPress-Handbuch/a101c54fd94af1a3d6a6e68fcc6c7dc9 to your computer and use it in GitHub Desktop.
Code example to output cached and uncached content through the fragment cache in W3 Total Cache (WordPress plugin)
<?php
if (!defined('W3TC_DYNAMIC_SECURITY')) {
define('W3TC_DYNAMIC_SECURITY', 'geheimesgeheimnis');
}
?>
<!--mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> echo 'Gecachter Inhalt: ' . date("Y-m-d", time()); -->
<?php echo 'Live-Inhalt: ' . date("Y-m-d", time()); ?>
<!--/mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment