Skip to content
This repository has been archived by the owner on Jun 23, 2019. It is now read-only.

Commit

Permalink
WordPress 4.3 compatibility
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.wp-plugins.org/xcache/trunk@1233631 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information
pierres committed Aug 29, 2015
1 parent 347d49f commit ce25eb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
12 changes: 5 additions & 7 deletions object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Plugin Name: XCache Object Cache Backend
* Description: XCache backend for the WordPress Object Cache.
* Version: 1.2.0
* Version: 1.2.1
* Author: Pierre Schmitz
* Author URI: https://pierre-schmitz.com/
* Plugin URI: https://wordpress.org/extend/plugins/xcache/
Expand Down Expand Up @@ -84,25 +84,25 @@ function wp_cache_set($key, $data, $group = '', $expire = 0) {
function wp_cache_switch_to_blog($blog_id) {
global $wp_object_cache;

return $wp_object_cache->switch_to_blog($blog_id);
$wp_object_cache->switch_to_blog($blog_id);
}

function wp_cache_add_global_groups($groups) {
global $wp_object_cache;

return $wp_object_cache->add_global_groups($groups);
$wp_object_cache->add_global_groups($groups);
}

function wp_cache_add_non_persistent_groups($groups) {
global $wp_object_cache;

return $wp_object_cache->wp_cache_add_non_persistent_groups($groups);
$wp_object_cache->wp_cache_add_non_persistent_groups($groups);
}

function wp_cache_reset() {
global $wp_object_cache;

return $wp_object_cache->reset();
$wp_object_cache->reset();
}

class XCache_Object_Cache {
Expand Down Expand Up @@ -356,5 +356,3 @@ public function switch_to_blog($blog_id) {
}

}

?>
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== XCache Object Cache Backend ===
Contributors: pierreschmitz
Donate link: https://pierre-schmitz.com
Stable tag: 1.2.0
Stable tag: 1.2.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Requires at least: 3.3.0
Tested up to: 4.2
Tested up to: 4.3
Tags: xcache, backend, cache, object cache, batcache, performance, speed

An object-cache implementation using the XCache extension.
Expand All @@ -32,10 +32,13 @@ This implementation uses [XCache](http://xcache.lighttpd.net/)'s variable cache
You will see this error message when either the xcache module is not loaded or the `xcache.var_size` directive is not set in your php.ini. If not configured, this setting defaults to 0 which disables the cache.

= "Cannot redeclare wp_cache_add()..." =
This error indicates that you likely have two copies of the object cache installed. Make sure you have put the file object-cache.php into your `/wp-content/` directory only. Do not upload it to the `/wp-content/plugins` direcotry or any subdirectory like `/wp-content/plugins/xcache`. The `XCache Object Cache Backend` is not a regular WordPress plugin but a `Drop-in`. Terefore you cannot store it into the `plugins` direcotry.
This error indicates that you likely have two copies of the object cache installed. Make sure you have put the file object-cache.php into your `/wp-content/` directory only. Do not upload it to the `/wp-content/plugins` directory or any subdirectory like `/wp-content/plugins/xcache`. The `XCache Object Cache Backend` is not a regular WordPress plugin but a `Drop-in`. Therefore you cannot store it into the `plugins` directory.

== Changelog ==

= 1.2.1 =
* WordPress 4.3 support

= 1.2.0 =
* Support WordPress Multisite setup
* Add [PHPUnit](http://phpunit.de/manual/current/en/index.html) test to ensure compatibility
Expand Down

0 comments on commit ce25eb0

Please sign in to comment.