2017 © Pedro Peláez
 

library wp-cache-bucket

Allows cache items to be tied to a single validation key

image

voceconnect/wp-cache-bucket

Allows cache items to be tied to a single validation key

  • Wednesday, August 17, 2016
  • by kevinlangleyjr
  • Repository
  • 18 Watchers
  • 6 Stars
  • 26,697 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 5 % Grown

The README.md

Please note: This plugin is no longer being actively maintained or supported.

WP Cache Bucket

Contributors: voceplatforms, prettyboymp, csloisel, kevinlangleyjr
Tags: cache, caching, performance, optimization
Requires at least: 3.0
Tested up to: 4.1
Stable tag: 1.1.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html, (*1)

Allows cache items to be tied to a single validation key so they can all be expired at once., (*2)

Description

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., (*3)

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., (*4)

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., (*5)

Usage

Cache Add:
wp_cache_bucket_add( $bucket, $key, $data, $group = '', $expire = 0 ), (*6)

Cache Set:
wp_cache_bucket_set( $bucket, $key, $data, $group = '', $expire = 0 ), (*7)

Cache Get:
wp_cache_bucket_get( $bucket, $key, $group = '', $force = false ), (*8)

Cache Delete:
wp_cache_bucket_flush( $bucket, $group = '' ), (*9)

Installation

As standard plugin:

See Installing Plugins., (*10)

As theme or plugin dependency:

After dropping the plugin into the containing theme or plugin, add this snippet:, (*11)

if( ! class_exists( 'WP_Cache_Bucket' ) ) {
    require_once( $path_to_wp_cache_bucket . '/wp-cache-bucket.php' );
}

Frequently Asked Questions

  • How is this different than WordPress Cache?
    • This plugin isn't much different from the built-in WordPress object cache methods, in fact it still uses them. The biggest advantage of this plugin is the ability to flush all data associated with a bucket.

Changelog

Please refer to the Release History, (*12)

The Versions

17/08 2016

dev-master

9999999-dev

Allows cache items to be tied to a single validation key

  Sources   Download

GPLv2+

by Curtis Loisel
by Michael Pretty
by Kevin Langley Jr

wordpress cache

18/12 2014

1.1.4

1.1.4.0

Allows cache items to be tied to a single validation key

  Sources   Download

GPLv2+

by Curtis Loisel
by Michael Pretty
by Kevin Langley Jr

wordpress cache

28/07 2014

1.1.3

1.1.3.0

Allows cache items to be tied to a single validation key

  Sources   Download

GPLv2+

by Curtis Loisel
by Michael Pretty
by Kevin Langley Jr

wordpress cache

24/06 2014

1.1.2

1.1.2.0

Allows cache items to be tied to a single validation key

  Sources   Download

GPLv2+

by Curtis Loisel
by Mike Pretty
by Kevin Langley Jr

wordpress cache

01/04 2014

1.1.1

1.1.1.0

Allows cache items to be tied to a single validation key

  Sources   Download

GPLv2+

by Curtis Loisel
by Mike Pretty
by Kevin Langley Jr

wordpress cache

11/11 2013

v1.1.0

1.1.0.0

Allows cache items to be tied to a single validation key

  Sources   Download

GPLv2+

by Curtis Loisel
by Mike Pretty
by Kevin Langley Jr

wordpress cache