Changed caching invalidation by using increment to using microtime.
This is a similar problem that WP core faced in https://core.trac.wordpress.org/ticket/23448.
This commit is contained in:
parent
cb21ea7a3d
commit
b3115bccc5
|
@ -94,7 +94,7 @@ class WC_Cache_Helper {
|
|||
$prefix = wp_cache_get( 'wc_' . $group . '_cache_prefix', $group );
|
||||
|
||||
if ( false === $prefix ) {
|
||||
$prefix = 1;
|
||||
$prefix = microtime();
|
||||
wp_cache_set( 'wc_' . $group . '_cache_prefix', $prefix, $group );
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ class WC_Cache_Helper {
|
|||
* @param string $group Group of cache to clear.
|
||||
*/
|
||||
public static function incr_cache_prefix( $group ) {
|
||||
wp_cache_incr( 'wc_' . $group . '_cache_prefix', 1, $group );
|
||||
wp_cache_set( 'wc_' . $group . '_cache_prefix', microtime(), $group );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue