Automattic\WooCommerce\Internal\ProductFilters
CacheController::invalidate_filter_data_cache
Invalidate all cache under filter data group.
Also resets the entry-count counter so the cap starts fresh.
Method of the class: CacheController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$CacheController = new CacheController(); $CacheController->invalidate_filter_data_cache(): void;
Changelog
| Since 10.8.0 | Introduced. |
| Since 10.8.0 | Resets CACHE_ENTRY_COUNT_TRANSIENT on invalidation. |
CacheController::invalidate_filter_data_cache() CacheController::invalidate filter data cache code WC 10.8.1
public function invalidate_filter_data_cache(): void {
WC_Cache_Helper::get_transient_version( self::CACHE_GROUP, true );
WC_Cache_Helper::invalidate_cache_group( self::CACHE_GROUP );
delete_transient( self::CACHE_ENTRY_COUNT_TRANSIENT );
}