WordPress plugin intelligence profile

Voce Group Keys

Create string keys for caching based off of specified groups, allowing clearing keys based on the groups to which they belong.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.0
Current version1.0.1
WordPress coverageTested up to WordPress 4.0
Minimum stackWP 2.8 · PHP —
Directory statusactive
Last directory update3 Feb 201511y ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Voce Group Keys version 1.0.1 as active, updated 11y ago and tested up to WordPress 4.0.

Overview

About this plugin

Gives functions to use to generate strings to use as keys for caching. Keys are generated based on a passed in name and

zero or more groups. Providing the same name and groups will return the same key until the entire cache is cleared

or the cache for a specific group name is cleared.

Usage

$key: STRING

$groups: STRING|ARRAY

php if ( class_exists( 'Voce_Group_Keys' ) ) {

// Get a key for $key that is in the $groups group(s) voce_get_cache_key( $key, $groups );

// Clear the keys for $groups // If multiple groups are specified, keys in any of the specified groups will be cleared voce_clear_group_cache( $groups );

// Clear all keys voce_clear_all_group_cache(); }

Example 1

php if ( class_exists( 'Voce_Group_Keys' ) ) {

// Get a key without a group echo voce_get_cache_key( 'data' ); // data_4942b011eb

// Get keys in a single group echo voce_get_cache_key( 'data', 'people' ); // data_9915443f5c echo voce_get_cache_key( 'more-data', 'people' ); // more-data_9915443f5c

// The same key will be returned echo voce_get_cache_key( 'data', 'people' ); // data_9915443f5c

// Clear keys in the 'people' group voce_clear_group_cache( 'people' );

// After clearing keys, a new key is returned for keys using that group echo voce_get_cache_key( 'data', 'people' ); // data_77j18e728 echo voce_get_cache_key( 'data' ); // data_4942b011eb

}

Example 2

php if ( class_exists( 'Voce_Group_Keys' ) ) {

// Set transients using multiple groups echo voce_get_cache_key( 'user-data', 'users' ); // user-data_9915443f5c echo voce_get_cache_key( 'post-data', 'posts' ); // post-data_85fb002156 echo voce_get_cache_key( 'user-post-data', array( 'posts', 'users' ) ); // user-post-data_4aee2c2c89

// Clear any keys using the 'posts' group voce_clear_group_cache( 'posts' );

// New keys returned for anything in the 'posts' group echo voce_get_cache_key( 'user-data', 'users' ); // user-data_9915443f5c echo voce_get_cache_key( 'post-data', 'posts' ); // post-data_820dd0dfb0 echo voce_get_cache_key( 'user-post-data', array( 'posts', 'users' ) ); // user-post-data_b7ac93f802

// The order of groups is irrelevant echo voce_get_cache_key( 'user-post-data', array( 'users', 'posts' ) ); // user-post-data_b7ac93f802

// Clear any keys in either the 'users' or 'posts' groups voce_clear_group_cache( array( 'users', 'posts' ) );

// Clear all keys voce_clear_all_group_cache(); }

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • cache
  • group
  • keys
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.0

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.0.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.0
Minimum requirementsWordPress 2.8 · PHP not listed
Update activity3 Feb 201511y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.