Skip to content

Commit 85e60bc

Browse files
author
Scott Cariss
committed
Merge pull request #10 from l3rady/bug-fix/wp_cache_flush_site_global_groups
wp_cache_flush_site doesnt flush global groups
2 parents 9dcaa96 + 671b63d commit 85e60bc

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Contributors: l3rady<br/>
44
Donate link: [http://l3rady.com/donate][2]<br/>
55
Tags: APC, object cache, backend, cache, performance, speed<br/>
66
Requires at least: 3.3<br/>
7-
Tested up to: 4.2.2<br/>
8-
Stable tag: 1.1.2
7+
Tested up to: 4.2.4<br/>
8+
Stable tag: 1.1.3
99

1010
WordPress APC Object Cache Backend provides a persistent memory-based backend for the WordPress object cache.
1111

@@ -40,6 +40,9 @@ Define `WP_APC_KEY_SALT` to something that is unique for each install (like an m
4040

4141
## Changelog ##
4242

43+
### 1.1.3 ###
44+
+ BUGFIX: Fix `wp_cache_flush_site()` to flush global groups [See][10]
45+
4346
### 1.1.2 ###
4447
+ BUGFIX: Fix site cache key not saving in `_set_cache_version()` [See][9]
4548

@@ -68,4 +71,5 @@ Define `WP_APC_KEY_SALT` to something that is unique for each install (like an m
6871
[6]: https://github.com/l3rady/WordPress-APC-Object-Cache/pull/2
6972
[7]: https://github.com/l3rady/WordPress-APC-Object-Cache/pull/1
7073
[8]: https://github.com/l3rady/WordPress-APC-Object-Cache/pull/7
71-
[9]: https://github.com/l3rady/WordPress-APC-Object-Cache/pull/9
74+
[9]: https://github.com/l3rady/WordPress-APC-Object-Cache/pull/9
75+
[10]: https://github.com/l3rady/WordPress-APC-Object-Cache/pull/10

object-cache.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: WordPress APC Object Cache Backend
44
Plugin URI: https://github.com/l3rady/WordPress-APC-Object-Cache
55
Description: APC backend for WordPress' Object Cache
6-
Version: 1.1.2
6+
Version: 1.1.3
77
Author: Scott Cariss
88
Author URI: http://l3rady.com
99
*/
@@ -663,6 +663,11 @@ public function flush_sites( $sites ) {
663663
$sites = array( $this->blog_prefix );
664664
}
665665

666+
// Add global groups (site 0) to be flushed.
667+
if ( !in_array( 0, $sites ) ) {
668+
$sites[] = 0;
669+
}
670+
666671
foreach ( $sites as $site ) {
667672
$version = $this->_get_site_cache_version( $site );
668673
$version++;

0 commit comments

Comments
 (0)