WP Cache Bucket

description

Author:Mike Pretty, Curtis Loisel, Voce Platforms (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:4.1
Plugin version:1.1.4
Added to WordPress repository:02-08-2013
Last updated:18-12-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:https://github.com/voceconnect/wp-cache-bucke...
Total downloads:735
Active installs:10+
plugin download
Click to start download

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 dependent 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.

Please Note: This plugin does not do anything by itself on activation. It is meant to be a helper class for theme and plugin developers.

Usage

Cache Add:

wp_cache_bucket_add( $bucket, $key, $data, $group = '', $expire = 0 )

Cache Set:

wp_cache_bucket_set( $bucket, $key, $data, $group = '', $expire = 0 )

Cache Get:

wp_cache_bucket_get( $bucket, $key, $group = '', $force = false )

Cache Delete:

wp_cache_bucket_flush( $bucket, $group = '' )