PHP code example of devgeniem / wp-redis-group-cache

1. Go to this page and download the library: Download devgeniem/wp-redis-group-cache library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

devgeniem / wp-redis-group-cache example snippets


function group_cache_blacklist( array $groups ) : array {
	$groups[] = 'customgroup';
	return $groups;
}
add_filter( 'geniem/cache/no_group_cache/blacklist', 'group_cache_blacklist', 1, 1 );

function no_group_cache( string $group, string $key ) : bool {
    if ( 'no_caching_key' === $group ) {
        return true;
    } else {
        return false;
    }
}
add_filter( 'geniem/cache/no_group_cache', 'no_group_cache', 1, 2 );