Version Description
- Reverted
build_key()
changes due to issues in multisite environments
Download this release
Release Info
Developer | tillkruess |
Plugin | Redis Object Cache |
Version | 2.0.15 |
Comparing to | |
See all releases |
Code changes from version 2.0.14 to 2.0.15
- includes/object-cache.php +4 -10
- readme.txt +7 -3
- redis-cache.php +1 -1
includes/object-cache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Redis Object Cache Drop-In
|
4 |
* Plugin URI: http://wordpress.org/plugins/redis-cache/
|
5 |
* Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Credis, HHVM, replication, clustering and WP-CLI.
|
6 |
-
* Version: 2.0.
|
7 |
* Author: Till Krüss
|
8 |
* Author URI: https://objectcache.pro
|
9 |
* License: GPLv3
|
@@ -1751,6 +1751,8 @@ LUA;
|
|
1751 |
);
|
1752 |
|
1753 |
return (object) [
|
|
|
|
|
1754 |
'hits' => $this->cache_hits,
|
1755 |
'misses' => $this->cache_misses,
|
1756 |
'ratio' => $total > 0 ? round( $this->cache_hits / ( $total / 100 ), 1 ) : 100,
|
@@ -1779,18 +1781,10 @@ LUA;
|
|
1779 |
* @return string
|
1780 |
*/
|
1781 |
public function build_key( $key, $group = 'default' ) {
|
1782 |
-
static $keys = [];
|
1783 |
-
|
1784 |
if ( empty( $group ) ) {
|
1785 |
$group = 'default';
|
1786 |
}
|
1787 |
|
1788 |
-
$key_index = "{$key}:{$group}";
|
1789 |
-
|
1790 |
-
if ( isset( $keys[ $key_index ] ) ) {
|
1791 |
-
return $keys[ $key_index ];
|
1792 |
-
}
|
1793 |
-
|
1794 |
$salt = defined( 'WP_REDIS_PREFIX' ) ? trim( WP_REDIS_PREFIX ) : '';
|
1795 |
$prefix = $this->is_global_group( $group ) ? $this->global_prefix : $this->blog_prefix;
|
1796 |
|
@@ -1799,7 +1793,7 @@ LUA;
|
|
1799 |
|
1800 |
$prefix = trim( $prefix, '_-:$' );
|
1801 |
|
1802 |
-
return
|
1803 |
}
|
1804 |
|
1805 |
/**
|
3 |
* Plugin Name: Redis Object Cache Drop-In
|
4 |
* Plugin URI: http://wordpress.org/plugins/redis-cache/
|
5 |
* Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Credis, HHVM, replication, clustering and WP-CLI.
|
6 |
+
* Version: 2.0.15
|
7 |
* Author: Till Krüss
|
8 |
* Author URI: https://objectcache.pro
|
9 |
* License: GPLv3
|
1751 |
);
|
1752 |
|
1753 |
return (object) [
|
1754 |
+
// Connected, Disabled, Unknown, Not connected
|
1755 |
+
// 'status' => '...',
|
1756 |
'hits' => $this->cache_hits,
|
1757 |
'misses' => $this->cache_misses,
|
1758 |
'ratio' => $total > 0 ? round( $this->cache_hits / ( $total / 100 ), 1 ) : 100,
|
1781 |
* @return string
|
1782 |
*/
|
1783 |
public function build_key( $key, $group = 'default' ) {
|
|
|
|
|
1784 |
if ( empty( $group ) ) {
|
1785 |
$group = 'default';
|
1786 |
}
|
1787 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1788 |
$salt = defined( 'WP_REDIS_PREFIX' ) ? trim( WP_REDIS_PREFIX ) : '';
|
1789 |
$prefix = $this->is_global_group( $group ) ? $this->global_prefix : $this->blog_prefix;
|
1790 |
|
1793 |
|
1794 |
$prefix = trim( $prefix, '_-:$' );
|
1795 |
|
1796 |
+
return "{$salt}{$prefix}:{$group}:{$key}";
|
1797 |
}
|
1798 |
|
1799 |
/**
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: tillkruess
|
|
3 |
Donate link: https://github.com/sponsors/tillkruss
|
4 |
Tags: redis, predis, phpredis, credis, hhvm, pecl, caching, cache, object cache, performance, replication, clustering, keydb
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 5.
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.0.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -83,6 +83,10 @@ To see a list of all available WP-CLI commands, please see the [WP CLI commands
|
|
83 |
|
84 |
== Changelog ==
|
85 |
|
|
|
|
|
|
|
|
|
86 |
= 2.0.14 =
|
87 |
|
88 |
- Made Object Cache Pro card translatable
|
@@ -470,6 +474,6 @@ Since Predis isn't maintained any longer, it's highly recommended to switch over
|
|
470 |
|
471 |
== Upgrade Notice ==
|
472 |
|
473 |
-
= 2.0.
|
474 |
|
475 |
Version 2.0 is a significant rewrite of the plugin. Please read the v2.0.0 release notes.
|
3 |
Donate link: https://github.com/sponsors/tillkruss
|
4 |
Tags: redis, predis, phpredis, credis, hhvm, pecl, caching, cache, object cache, performance, replication, clustering, keydb
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.0.15
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
83 |
|
84 |
== Changelog ==
|
85 |
|
86 |
+
= 2.0.15 =
|
87 |
+
|
88 |
+
- Reverted `build_key()` changes due to issues in multisite environments
|
89 |
+
|
90 |
= 2.0.14 =
|
91 |
|
92 |
- Made Object Cache Pro card translatable
|
474 |
|
475 |
== Upgrade Notice ==
|
476 |
|
477 |
+
= 2.0.15 =
|
478 |
|
479 |
Version 2.0 is a significant rewrite of the plugin. Please read the v2.0.0 release notes.
|
redis-cache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Redis Object Cache
|
4 |
* Plugin URI: https://wordpress.org/plugins/redis-cache/
|
5 |
* Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Credis, HHVM, replication, clustering and WP-CLI.
|
6 |
-
* Version: 2.0.
|
7 |
* Text Domain: redis-cache
|
8 |
* Domain Path: /languages
|
9 |
* Network: true
|
3 |
* Plugin Name: Redis Object Cache
|
4 |
* Plugin URI: https://wordpress.org/plugins/redis-cache/
|
5 |
* Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Credis, HHVM, replication, clustering and WP-CLI.
|
6 |
+
* Version: 2.0.15
|
7 |
* Text Domain: redis-cache
|
8 |
* Domain Path: /languages
|
9 |
* Network: true
|