WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WP Cache Bucket

Allows cache items to be tied to a single validation key so they can all be expired at once.

Please Note:

This plugin does not do anything by itself on activation. It is meant as a helper class for theme and plugin developers.

Cache bucket uses the built-in WordPress wp_cache but contains methods to associate multiple items with a single cache object or 'bucket' without having to stick all of them into a single cache key. This is helpful when you have multiple items that need to be updated when one item is modified.

Because the key used to identify the cached item is dependant on other variables when it's being accessed, there is no easy way to identify all of the related keys that need to expire, and Memcached doesn't provide is a way to invalidate a group of data. WP Cache Bucket provides a wrapper around the cache that gives a "bucket" interface, allowing us to easily expire the entire set of cached menus when an object changes.

Usage

Use wp_cache_bucket_add( $bucket, $key, $data, $group = '', $expire = 0 ) to add a cache bucket.
Use wp_cache_bucket_set( $bucket, $key, $data, $group = '', $expire = 0 ) to set a cache bucket.
Use wp_cache_bucket_get( $bucket, $key, $group = '', $force = false ) to get a cache bucket.
Use wp_cache_bucket_flush( $bucket, $group = '' ) to destroy a cached bucket.

Requires: 3.0 or higher
Compatible up to: 3.8.3
Last Updated: 2014-6-24
Downloads: 248

Ratings

0 stars
0 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