wp-memcached icon indicating copy to clipboard operation
wp-memcached copied to clipboard

[Feature request/question] How to disable for a single website in wpmu ?

Open mbautista opened this issue 9 months ago • 2 comments

Hello, Thank you for this module, it rocks :)

Is it possible to disable the cache object on a specific website in a wordpress network ? Is there any constant and/or filter we could use ?

As I could not find it I added a filter in the object-cache.php but I'm not sure if it's required and/or in the right place :

function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
        global $wp_object_cache;

        if ( defined( 'WP_INSTALLING' ) == false && apply_filters( 'ircf_wp_cache_disabled', false ) == false) {
                return $wp_object_cache->set( $key, $data, $group, $expire );
        } else {
                return $wp_object_cache->delete( $key, $group );
        }
}

Thank you very much :) Mathieu.

mbautista avatar May 13 '24 12:05 mbautista