In this article:
Social layer, personalization, and e-commerce are common elements of highly dynamic websites. That means that there are other solutions than caching entire pages to improve user experience and performance. Fragment Caching bridges the gap between no caching and the “ideal,” full-page caching. By extending the WordPress Transient API, W3TC allows developers to bring both horizontal and vertical scales to bear without doing anything differently.
How do I implement fragment caching?
The W3 Total Cache Fragment caching layer adds new functionality to the WordPress Transients API:
- Adds support for grouping transients both per blog and sitewide
- Adds support for manual flushing of registered transient groups
- Adds support for action-based flushing of registered transient groups
- Adds support for caching filters and actions
To make the plugin aware that you’re grouping transients, you can use the following example as a guide:
It’s best to test on a page not visible to the public, or even better—a development environment. Just add define(‘W3TC_PRO_DEV_MODE’, true); to your wp-config.php file to test with Pro features on your development environment.
W3 Total Cache
You haven't seen fast until you've tried PRO
Full Site CDN + Additional Caching Options
Advanced Caching Statistics, Purge Logs and More
Everything you need to scale your WordPress Website and improve your PageSpeed.