Title: Voce Group Keys
Author: banderon
Published: <strong>کانوونی دووەم 6, 2015</strong>
Last modified: شوبات 3, 2015

---

گەڕان لە پێوەکراوەکان

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/voce-group-keys.svg)

# Voce Group Keys

 لەلایەن [banderon](https://profiles.wordpress.org/banderon/)

[داگرتن](https://downloads.wordpress.org/plugin/voce-group-keys.1.0.1.zip)

 * [وردەکارییەکان](https://ku.wordpress.org/plugins/voce-group-keys/#description)
 * [پێداچوونەوەکان](https://ku.wordpress.org/plugins/voce-group-keys/#reviews)
 *  [دامەزراندن](https://ku.wordpress.org/plugins/voce-group-keys/#installation)
 * [گەشەپێدان](https://ku.wordpress.org/plugins/voce-group-keys/#developers)

 [پشتیوانی](https://wordpress.org/support/plugin/voce-group-keys/)

## وەسف

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();
    }
    ```

## دامەزراندن

 1. Upload `voce-group-keys.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Use the plugin’s functions where necessary in your code, making sure to check if
    the plugin is enabled

## پێداچوونەوەکان

هیچ پێداچوونەوەیەک نەنووسراوە بۆ ئەم پێوەکراوە.

## بەشداربووان و گەشەپێدەران

“Voce Group Keys” نەرمەواڵەیەکی سەرچاوە کراوەیە. ئەم کەسانەی خوارەوە بەشدارییان 
تێدا کردووە.

بەشداربووان

 *   [ banderon ](https://profiles.wordpress.org/banderon/)

[“Voce Group Keys” وەربگێڕە بۆ زمانەکەی خۆت.](https://translate.wordpress.org/projects/wp-plugins/voce-group-keys)

### دەتەوێت بەشداربیت لە گەشەپێدان؟

[گەڕان لە کۆدەکەدا بکە](https://plugins.trac.wordpress.org/browser/voce-group-keys/)،
سەیری [تەمارگەی (SVN)](https://plugins.svn.wordpress.org/voce-group-keys/) بکە، 
یان بەشداربە لە [ڕووداوتۆماری گەشەپێدان](https://plugins.trac.wordpress.org/log/voce-group-keys/)
لە ڕێگەی [(RSS)](https://plugins.trac.wordpress.org/log/voce-group-keys/?limit=100&mode=stop_on_copy&format=rss).

## ڕووداوتۆمارگەریی گۆڕین

#### 1.0.1

*Bug fix: added slight delay when saving new keys to avoid collisions

#### 1.0.0

 * Initial release

## مێتا

 *  وەشان **1.0.1**
 *  دوایین بەڕۆژکردنەوە **12 ساڵ لەمەوبەر**
 *  دامەزراندنی چالاک **کەمتر لە 10**
 *  وەشانی وۆردپرێس ** 2.8 یان بەرزتر **
 *  تاقیکراوەتەوە تا **4.0.38**
 *  زمان
 * [English (US)](https://wordpress.org/plugins/voce-group-keys/)
 * تاگەکان
 * [cache](https://ku.wordpress.org/plugins/tags/cache/)[group](https://ku.wordpress.org/plugins/tags/group/)
   [keys](https://ku.wordpress.org/plugins/tags/keys/)
 *  [بینینی پێشکەوتوو](https://ku.wordpress.org/plugins/voce-group-keys/advanced/)

## هەڵسەنگاندنەکان

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/voce-group-keys/reviews/#new-post)

[بینینی هەموو پێداچوونەوەکان](https://wordpress.org/support/plugin/voce-group-keys/reviews/)

## بەشداربووان

 *   [ banderon ](https://profiles.wordpress.org/banderon/)

## پشتیوانی

هیچت هەیە بۆ وتن؟ پێویستت بە یارمەتییە؟

 [بینینی مەکۆی پاڵپشتی](https://wordpress.org/support/plugin/voce-group-keys/)