Redis Object Cache - Version 1.5.4

Version Description

  • Removed metrics
Download this release

Release Info

Developer tillkruess
Plugin Icon 128x128 Redis Object Cache
Version 1.5.4
Comparing to
See all releases

Code changes from version 1.5.3 to 1.5.4

Files changed (3) hide show
  1. includes/object-cache.php +1 -1
  2. readme.txt +5 -6
  3. redis-cache.php +2 -50
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, HHVM, replication, clustering and WP-CLI.
6
- Version: 1.5.3
7
  Author: Till Krüss
8
  Author URI: https://till.im/
9
  License: GPLv3
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, HHVM, replication, clustering and WP-CLI.
6
+ Version: 1.5.4
7
  Author: Till Krüss
8
  Author URI: https://till.im/
9
  License: GPLv3
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: redis, predis, phpredis, hhvm, pecl, caching, cache, object cache, perform
5
  Requires at least: 3.3
6
  Tested up to: 5.3
7
  Requires PHP: 5.4
8
- Stable tag: 1.5.3
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -142,11 +142,6 @@ To adjust the configuration, define any of the following constants in your `wp-c
142
 
143
  Set to `false` to disable promotions for [Redis Cache Pro](https://wprediscache.com/).
144
 
145
- * `WP_REDIS_DISABLE_METRICS` (default: _not set_)
146
-
147
- Set to `false` to disable the collection of system metrics. No user data such as emails, names, IPs, browser, usage or behavioral data is collected. Just version numbers and anonymous configuration options to help make better development decisions.
148
-
149
-
150
  == Replication & Clustering ==
151
 
152
  To use Replication, Sharding or Clustering, make sure your server is running PHP7 or higher (HHVM is not supported) and you consulted the [Predis](https://github.com/nrk/predis) or [PhpRedis](https://github.com/phpredis/phpredis) documentation.
@@ -222,6 +217,10 @@ The following commands are supported:
222
 
223
  == Changelog ==
224
 
 
 
 
 
225
  = 1.5.3 =
226
 
227
  - Fixed: Call to undefined function `get_plugin_data()`
5
  Requires at least: 3.3
6
  Tested up to: 5.3
7
  Requires PHP: 5.4
8
+ Stable tag: 1.5.4
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
142
 
143
  Set to `false` to disable promotions for [Redis Cache Pro](https://wprediscache.com/).
144
 
 
 
 
 
 
145
  == Replication & Clustering ==
146
 
147
  To use Replication, Sharding or Clustering, make sure your server is running PHP7 or higher (HHVM is not supported) and you consulted the [Predis](https://github.com/nrk/predis) or [PhpRedis](https://github.com/phpredis/phpredis) documentation.
217
 
218
  == Changelog ==
219
 
220
+ = 1.5.4 =
221
+
222
+ - Removed metrics
223
+
224
  = 1.5.3 =
225
 
226
  - Fixed: Call to undefined function `get_plugin_data()`
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, HHVM, replication, clustering and WP-CLI.
6
- Version: 1.5.3
7
  Text Domain: redis-cache
8
  Domain Path: /languages
9
  Author: Till Krüss
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  }
18
 
19
- define( 'WP_REDIS_VERSION', '1.5.3' );
20
 
21
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
22
  require_once dirname( __FILE__ ) . '/includes/wp-cli-commands.php';
@@ -41,14 +41,12 @@ class RedisObjectCache {
41
  add_action( 'deactivate_plugin', array( $this, 'on_deactivation' ) );
42
 
43
  add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', array( $this, 'add_admin_menu_page' ) );
44
- add_action( 'admin_init', array( $this, 'schedule_events' ) );
45
  add_action( 'admin_notices', array( $this, 'show_admin_notices' ) );
46
  add_action( 'admin_notices', array( $this, 'pro_notice' ) );
47
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
48
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
49
  add_action( 'load-' . $this->screen, array( $this, 'do_admin_actions' ) );
50
  add_action( 'load-' . $this->screen, array( $this, 'add_admin_page_notices' ) );
51
- add_action( 'redis_gather_metrics', array( $this, 'gather_metrics' ) );
52
  add_action( 'wp_ajax_roc_dismiss_notice', array( $this, 'dismiss_notice' ) );
53
 
54
  add_filter( sprintf(
@@ -324,52 +322,6 @@ class RedisObjectCache {
324
 
325
  }
326
 
327
- public function schedule_events()
328
- {
329
- // TODO: remove daily schedule and switch to weekly?
330
-
331
- if ( ! wp_next_scheduled( 'redis_gather_metrics' ) ) {
332
- wp_schedule_event( time(), 'daily', 'redis_gather_metrics' );
333
- }
334
- }
335
-
336
- public function gather_metrics()
337
- {
338
- // disable metrics using WP_REDIS_DISABLE_METRICS
339
- if ( defined( 'WP_REDIS_DISABLE_METRICS' ) && WP_REDIS_DISABLE_METRICS ) {
340
- return;
341
- }
342
-
343
- try {
344
- wp_remote_post( 'https://wprediscache.com/api/metrics', [
345
- 'blocking' => false,
346
- 'headers' => [
347
- 'Accept' => 'application/json',
348
- ],
349
- 'body' => [
350
- 'url' => get_home_url(),
351
- 'plugin' => WP_REDIS_VERSION,
352
- 'wordpress' => get_bloginfo('version'),
353
- 'network' => is_multisite(),
354
- 'php' => phpversion(),
355
- 'phpredis' => phpversion('redis'),
356
- 'igbinary' => phpversion('igbinary'),
357
- 'redis' => $this->get_redis_version(),
358
- 'client' => $this->get_redis_client_name(),
359
- 'serializer' => defined('WP_REDIS_SERIALIZER') ? WP_REDIS_SERIALIZER : null,
360
- 'woocommerce' => defined('WC_VERSION') ? WC_VERSION : null,
361
- // only gathers boolean values (no DSNs)
362
- 'cluster' => defined('WP_REDIS_CLUSTER') ? (bool) WP_REDIS_CLUSTER : null,
363
- 'servers' => defined('WP_REDIS_SERVERS') ? (bool) WP_REDIS_SERVERS : null,
364
- 'sentinel' => defined('WP_REDIS_SENTINEL') ? (bool) WP_REDIS_SENTINEL : null,
365
- 'shards' => defined('WP_REDIS_SHARDS') ? (bool) WP_REDIS_SHARDS : null,
366
- ],
367
- ] );
368
- } catch (\Exception $discard) {
369
- //
370
- }
371
- }
372
-
373
  public function do_admin_actions() {
374
 
375
  global $wp_filesystem;
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, HHVM, replication, clustering and WP-CLI.
6
+ Version: 1.5.4
7
  Text Domain: redis-cache
8
  Domain Path: /languages
9
  Author: Till Krüss
16
  exit;
17
  }
18
 
19
+ define( 'WP_REDIS_VERSION', '1.5.4' );
20
 
21
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
22
  require_once dirname( __FILE__ ) . '/includes/wp-cli-commands.php';
41
  add_action( 'deactivate_plugin', array( $this, 'on_deactivation' ) );
42
 
43
  add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', array( $this, 'add_admin_menu_page' ) );
 
44
  add_action( 'admin_notices', array( $this, 'show_admin_notices' ) );
45
  add_action( 'admin_notices', array( $this, 'pro_notice' ) );
46
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
47
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
48
  add_action( 'load-' . $this->screen, array( $this, 'do_admin_actions' ) );
49
  add_action( 'load-' . $this->screen, array( $this, 'add_admin_page_notices' ) );
 
50
  add_action( 'wp_ajax_roc_dismiss_notice', array( $this, 'dismiss_notice' ) );
51
 
52
  add_filter( sprintf(
322
 
323
  }
324
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  public function do_admin_actions() {
326
 
327
  global $wp_filesystem;