WordPress.org

Plugin Directory

FragmentCache

Boost your page performance by caching individual page fragments. Works with logged-in users too!

  1. Install FragmentCache either via the WordPress.org plugin directory, or by uploading the files to your server
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Edit your template(s) to include FragmentCache like so:
<?php
$cache = new FragmentCache();
if ( ! $cache->output() ) {     
  functions_that_do_stuff_live();
  these_should_echo();
  // IMPORTANT
  $cache->store();
}
?>

In other words, to wrap this around a general PHP/HTML template you could use:

<?php
$cache = new FragmentCache();
if ( ! $cache->output() ):
?>
  <div>
    <?php output_expensive_queries(); ?>
  </div>

<?php
  $cache->store();
endif;
?>

Requires: 3.0.1 or higher
Compatible up to: 3.6.1
Last Updated: 2013-12-4
Active Installs: 40+

Ratings

5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1