diff --git a/object-cache.php b/object-cache.php index 1f312da8996a0fe4014b240dfbb7cc82b2c102a9..35a063e1f7afcdc812ebf1d045708b47b00e718a 100644 --- a/object-cache.php +++ b/object-cache.php @@ -1010,4 +1010,28 @@ class WP_Object_Cache { return false; } -} + + /** + * Sets the list of global groups. + * + * @param array $groups List of groups that are global. + */ + function add_global_groups( $groups ) { + $groups = (array) $groups; + + $groups = array_fill_keys( $groups, true ); + $this->global_groups = array_merge( $this->global_groups, $groups ); + } + + /** + * Sets the list of groups not to be cached by Redis. + * + * @param array $groups List of groups that are to be ignored. + */ + function add_non_persistent_groups( $groups ) { + $groups = (array) $groups; + + $groups = array_fill_keys( $groups, true ); + $this->no_redis_groups = array_merge( $this->no_redis_groups, $groups ); + } +}