WordPress.org

Plugin Directory

FragmentCache

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

How do I store multiple fragment caches on the same page (or share a fragment cache across multiple pages)?

By default, calling new FragmentCache() will create a key based on the current permalink URL (e.g. '/posts/12345'). To get around that, you'll have to pass a unique caching key like so:

// uses unique key. NOTE: this key is global across your whole site,
// so don't use the same key with a different fragment!
$cache = new FragmentCache(array('key' => 'my-unique-key'));

How is the cache stored?

Right now it is using a file-based cache system, meaning it will store .txt files in wp-content/cache.

How does the cache expire?

The cache is based on a date that you pass in, or the current page's last updated date, by default. Meaning if the page gets updated, the cache will be invalidated, and a new fragment cache will be generated on the next page load. Old cache files never get deleted automatically, you have to do this through the WP Admin plugin settings page.

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

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