Redis Object Cache - Version 2.0.5

Version Description

Version 2.0 is a significant rewrite of the plugin. Please read the v2.0.0 release notes.

  • Fixed multisite action buttons not working
  • Removed outdated PHP 5.4 warning
  • Added read_timeout support to Credis
  • Display connection parameters when using Credis
  • Added wiki link to Predis upgrade notice
Download this release

Release Info

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

Code changes from version 2.0.4 to 2.0.5

assets/css/admin.css CHANGED
@@ -33,6 +33,10 @@
33
  color: #d54e21;
34
  }
35
 
 
 
 
 
36
  #rediscache .card ul {
37
  list-style: circle;
38
  padding-left: 25px;
33
  color: #d54e21;
34
  }
35
 
36
+ #rediscache .form-table .description.is-notice a {
37
+ color: #d54e21;
38
+ }
39
+
40
  #rediscache .card ul {
41
  list-style: circle;
42
  padding-left: 25px;
includes/class-plugin.php CHANGED
@@ -80,8 +80,7 @@ class Plugin {
80
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
81
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_redis_metrics' ) );
82
 
83
- add_action( 'load-' . $this->screen, array( $this, 'do_admin_actions' ) );
84
- add_action( 'load-' . $this->screen, array( $this, 'add_admin_page_notices' ) );
85
 
86
  add_action( 'wp_dashboard_setup', array( $this, 'setup_dashboard_widget' ) );
87
  add_action( 'wp_network_dashboard_setup', array( $this, 'setup_dashboard_widget' ) );
@@ -457,45 +456,6 @@ class Plugin {
457
  }
458
  }
459
 
460
- public function add_admin_page_notices() {
461
- // show PHP version warning
462
- if ( version_compare( PHP_VERSION, '5.4.0', '<' ) ) {
463
- add_settings_error( '', 'redis-cache', __( 'This plugin requires PHP 5.4 or greater.', 'redis-cache' ) );
464
- }
465
-
466
- // show action success/failure messages
467
- if ( isset( $_GET['message'] ) ) {
468
- switch ( $_GET['message'] ) {
469
- case 'cache-enabled':
470
- $message = __( 'Object cache enabled.', 'redis-cache' );
471
- break;
472
- case 'enable-cache-failed':
473
- $error = __( 'Object cache could not be enabled.', 'redis-cache' );
474
- break;
475
- case 'cache-disabled':
476
- $message = __( 'Object cache disabled.', 'redis-cache' );
477
- break;
478
- case 'disable-cache-failed':
479
- $error = __( 'Object cache could not be disabled.', 'redis-cache' );
480
- break;
481
- case 'cache-flushed':
482
- $message = __( 'Object cache flushed.', 'redis-cache' );
483
- break;
484
- case 'flush-cache-failed':
485
- $error = __( 'Object cache could not be flushed.', 'redis-cache' );
486
- break;
487
- case 'dropin-updated':
488
- $message = __( 'Updated object cache drop-in and enabled Redis object cache.', 'redis-cache' );
489
- break;
490
- case 'update-dropin-failed':
491
- $error = __( 'Object cache drop-in could not be updated.', 'redis-cache' );
492
- break;
493
- }
494
-
495
- add_settings_error( '', 'redis-cache', isset( $message ) ? $message : $error, isset( $message ) ? 'updated' : 'error' );
496
- }
497
- }
498
-
499
  public function do_admin_actions() {
500
  global $wp_filesystem;
501
 
@@ -513,45 +473,102 @@ class Plugin {
513
  $url = $this->action_link( $action );
514
 
515
  if ( $action === 'flush-cache' ) {
516
- $message = wp_cache_flush() ? 'cache-flushed' : 'flush-cache-failed';
 
 
 
 
 
 
 
 
 
 
 
 
517
  }
518
 
519
  // do we have filesystem credentials?
520
  if ( $this->initialize_filesystem( $url, true ) ) {
521
- switch ( $action ) {
522
- case 'enable-cache':
523
- $result = $wp_filesystem->copy(
524
- WP_REDIS_PLUGIN_PATH . '/includes/object-cache.php',
525
- WP_CONTENT_DIR . '/object-cache.php',
526
- true,
527
- FS_CHMOD_FILE
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
528
  );
529
- do_action( 'redis_object_cache_enable', $result );
530
- $message = $result ? 'cache-enabled' : 'enable-cache-failed';
531
- break;
532
-
533
- case 'disable-cache':
534
- $result = $wp_filesystem->delete( WP_CONTENT_DIR . '/object-cache.php' );
535
- do_action( 'redis_object_cache_disable', $result );
536
- $message = $result ? 'cache-disabled' : 'disable-cache-failed';
537
- break;
538
-
539
- case 'update-dropin':
540
- $result = $wp_filesystem->copy(
541
- WP_REDIS_PLUGIN_PATH . '/includes/object-cache.php',
542
- WP_CONTENT_DIR . '/object-cache.php',
543
- true,
544
- FS_CHMOD_FILE
 
 
 
 
 
 
 
 
545
  );
546
- do_action( 'redis_object_cache_update_dropin', $result );
547
- $message = $result ? 'dropin-updated' : 'update-dropin-failed';
548
- break;
549
  }
 
550
  }
551
 
552
- // redirect if status `$message` was set
553
- if ( isset( $message ) ) {
554
- wp_safe_redirect( network_admin_url( add_query_arg( 'message', $message, $this->page ) ) );
 
 
 
 
 
555
  exit;
556
  }
557
  }
80
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
81
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_redis_metrics' ) );
82
 
83
+ add_action( 'load-settings_page_redis-cache', array( $this, 'do_admin_actions' ) );
 
84
 
85
  add_action( 'wp_dashboard_setup', array( $this, 'setup_dashboard_widget' ) );
86
  add_action( 'wp_network_dashboard_setup', array( $this, 'setup_dashboard_widget' ) );
456
  }
457
  }
458
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  public function do_admin_actions() {
460
  global $wp_filesystem;
461
 
473
  $url = $this->action_link( $action );
474
 
475
  if ( $action === 'flush-cache' ) {
476
+ wp_cache_flush()
477
+ ? add_settings_error(
478
+ 'redis-cache',
479
+ 'flush',
480
+ __( 'Object cache flushed.', 'redis-cache' ),
481
+ 'updated'
482
+ )
483
+ : add_settings_error(
484
+ 'redis-cache',
485
+ 'flush',
486
+ __( 'Object cache could not be flushed.', 'redis-cache' ),
487
+ 'error'
488
+ );
489
  }
490
 
491
  // do we have filesystem credentials?
492
  if ( $this->initialize_filesystem( $url, true ) ) {
493
+
494
+ if ( $action === 'enable-cache' ) {
495
+ $result = $wp_filesystem->copy(
496
+ WP_REDIS_PLUGIN_PATH . '/includes/object-cache.php',
497
+ WP_CONTENT_DIR . '/object-cache.php',
498
+ true,
499
+ FS_CHMOD_FILE
500
+ );
501
+
502
+ do_action( 'redis_object_cache_enable', $result );
503
+
504
+ $result
505
+ ? add_settings_error(
506
+ 'redis-cache',
507
+ 'dropin',
508
+ __( 'Object cache enabled.', 'redis-cache' ),
509
+ 'updated'
510
+ )
511
+ : add_settings_error(
512
+ 'redis-cache',
513
+ 'dropin',
514
+ __( 'Object cache could not be enabled.', 'redis-cache' ),
515
+ 'error'
516
+ );
517
+ }
518
+
519
+ if ( $action === 'disable-cache' ) {
520
+ $result = $wp_filesystem->delete( WP_CONTENT_DIR . '/object-cache.php' );
521
+
522
+ do_action( 'redis_object_cache_disable', $result );
523
+
524
+ $result
525
+ ? add_settings_error(
526
+ 'redis-cache',
527
+ 'dropin', __( 'Object cache disabled.', 'redis-cache' ),
528
+ 'updated'
529
+ )
530
+ : add_settings_error(
531
+ 'redis-cache',
532
+ 'dropin', __( 'Object cache could not be disabled.', 'redis-cache' ),
533
+ 'error'
534
  );
535
+ }
536
+
537
+ if ( $action === 'update-dropin' ) {
538
+ $result = $wp_filesystem->copy(
539
+ WP_REDIS_PLUGIN_PATH . '/includes/object-cache.php',
540
+ WP_CONTENT_DIR . '/object-cache.php',
541
+ true,
542
+ FS_CHMOD_FILE
543
+ );
544
+
545
+ do_action( 'redis_object_cache_update_dropin', $result );
546
+
547
+ $result
548
+ ? add_settings_error(
549
+ 'redis-cache',
550
+ 'dropin',
551
+ __( 'Updated object cache drop-in and enabled Redis object cache.', 'redis-cache' ),
552
+ 'updated'
553
+ )
554
+ : add_settings_error(
555
+ 'redis-cache',
556
+ 'dropin',
557
+ __( 'Object cache drop-in could not be updated.', 'redis-cache' ),
558
+ 'error'
559
  );
 
 
 
560
  }
561
+
562
  }
563
 
564
+ $messages = get_settings_errors( 'redis-cache' );
565
+
566
+ if ( ! empty( $messages ) ) {
567
+ set_transient( 'settings_errors', $messages, 30 );
568
+
569
+ wp_safe_redirect(
570
+ network_admin_url( add_query_arg( 'settings-updated', 1, $this->page ) )
571
+ );
572
  exit;
573
  }
574
  }
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.4
7
  * Author: Till Krüss
8
  * Author URI: https://wprediscache.com
9
  * License: GPLv3
@@ -727,7 +727,7 @@ class WP_Object_Cache {
727
  $connection_string = array_values( WP_REDIS_SERVERS )[0];
728
  $sentinel = new Credis_Sentinel( new Credis_Client( $connection_string ) );
729
  $this->redis = $sentinel->getCluster( WP_REDIS_SENTINEL );
730
- $args['is_sentinel'] = true;
731
  } elseif ( defined( 'WP_REDIS_CLUSTER' ) || defined( 'WP_REDIS_SERVERS' ) ) {
732
  $parameters['db'] = $parameters['database'];
733
 
@@ -753,30 +753,30 @@ class WP_Object_Cache {
753
 
754
  $this->redis = new Credis_Cluster( $clients );
755
 
756
- $args = $clients;
757
- $args[ $is_cluster ? 'is_cluster' : 'is_multi' ] = true;
758
  } else {
759
- $host = 'unix' === $parameters['scheme']
760
- ? $parameters['path']
761
- : $parameters['host'];
762
-
763
  $args = [
764
- "{$parameters['scheme']}://{$host}",
765
- $parameters['port'],
766
- $parameters['timeout'],
767
- '',
768
- isset( $parameters['database'] ) ? $parameters['database'] : 0,
769
- isset( $parameters['password'] ) ? $parameters['password'] : null,
770
  ];
771
 
772
- $this->redis = new Credis_Client( ...$args );
773
  }
774
 
775
- // Credis uses phpredis if it detects it unless we force it to run standalone.
776
  $this->redis->forceStandalone();
777
 
778
  $this->redis->connect();
779
 
 
 
 
 
 
780
  $this->diagnostics = array_merge(
781
  [ 'client' => sprintf( '%s (v%s)', $client, Credis_Client::VERSION ) ],
782
  $args
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.5
7
  * Author: Till Krüss
8
  * Author URI: https://wprediscache.com
9
  * License: GPLv3
727
  $connection_string = array_values( WP_REDIS_SERVERS )[0];
728
  $sentinel = new Credis_Sentinel( new Credis_Client( $connection_string ) );
729
  $this->redis = $sentinel->getCluster( WP_REDIS_SENTINEL );
730
+ $args['servers'] = WP_REDIS_SERVERS;
731
  } elseif ( defined( 'WP_REDIS_CLUSTER' ) || defined( 'WP_REDIS_SERVERS' ) ) {
732
  $parameters['db'] = $parameters['database'];
733
 
753
 
754
  $this->redis = new Credis_Cluster( $clients );
755
 
756
+ $args['servers'] = $clients;
 
757
  } else {
 
 
 
 
758
  $args = [
759
+ 'host' => $parameters['scheme'] === 'unix' ? $parameters['path'] : $parameters['host'],
760
+ 'port' => $parameters['port'],
761
+ 'timeout' => $parameters['timeout'],
762
+ 'persistent' => null,
763
+ 'database' => $parameters['database'],
764
+ 'password' => isset( $parameters['password'] ) ? $parameters['password'] : null,
765
  ];
766
 
767
+ $this->redis = new Credis_Client( ...array_values( $args ) );
768
  }
769
 
770
+ // Don't use PhpRedis
771
  $this->redis->forceStandalone();
772
 
773
  $this->redis->connect();
774
 
775
+ if ( $parameters['read_timeout'] ) {
776
+ $args['read_timeout'] = $parameters['read_timeout'];
777
+ $this->redis->setReadTimeout( $parameters['read_timeout'] );
778
+ }
779
+
780
  $this->diagnostics = array_merge(
781
  [ 'client' => sprintf( '%s (v%s)', $client, Credis_Client::VERSION ) ],
782
  $args
includes/ui/diagnostics.php CHANGED
@@ -33,8 +33,9 @@ if ( $dropin && ! $disabled ) {
33
  );
34
  }
35
 
36
- $info['Redis Extension'] = class_exists( 'Redis' ) ? phpversion( 'redis' ) : 'Not found';
37
- $info['Predis Client'] = class_exists( 'Predis\Client' ) ? Predis\Client::VERSION : 'Not found';
 
38
 
39
  if ( defined( 'PHP_VERSION' ) ) {
40
  $info['PHP Version'] = PHP_VERSION;
@@ -44,9 +45,11 @@ if ( defined( 'HHVM_VERSION' ) ) {
44
  $info['HHVM Version'] = HHVM_VERSION;
45
  }
46
 
 
47
  $info['Redis Version'] = $plugin->get_redis_version() ?: 'Unknown';
48
 
49
  $info['Multisite'] = is_multisite() ? 'Yes' : 'No';
 
50
 
51
  if ( $dropin ) {
52
  $info['Global Prefix'] = wp_json_encode( $wp_object_cache->global_prefix );
33
  );
34
  }
35
 
36
+ $info['PhpRedis'] = class_exists( 'Redis' ) ? phpversion( 'redis' ) : 'Not loaded';
37
+ $info['Predis'] = class_exists( 'Predis\Client' ) ? Predis\Client::VERSION : 'Not loaded';
38
+ $info['Credis'] = class_exists( 'Credis_Client' ) ? Credis_Client::VERSION : 'Not loaded';
39
 
40
  if ( defined( 'PHP_VERSION' ) ) {
41
  $info['PHP Version'] = PHP_VERSION;
45
  $info['HHVM Version'] = HHVM_VERSION;
46
  }
47
 
48
+ $info['Plugin Version'] = WP_REDIS_VERSION;
49
  $info['Redis Version'] = $plugin->get_redis_version() ?: 'Unknown';
50
 
51
  $info['Multisite'] = is_multisite() ? 'Yes' : 'No';
52
+ $info['Filesystem'] = $plugin->initialize_filesystem( '', true ) ? 'Yes' : 'No';
53
 
54
  if ( $dropin ) {
55
  $info['Global Prefix'] = wp_json_encode( $wp_object_cache->global_prefix );
includes/ui/settings.php CHANGED
@@ -18,6 +18,8 @@ defined( '\\ABSPATH' ) || exit;
18
  <?php esc_html_e( 'Redis Object Cache', 'redis-cache' ); ?>
19
  </h1>
20
 
 
 
21
  <div class="columns">
22
 
23
  <div class="content-column">
18
  <?php esc_html_e( 'Redis Object Cache', 'redis-cache' ); ?>
19
  </h1>
20
 
21
+ <?php is_network_admin() && settings_errors(); ?>
22
+
23
  <div class="columns">
24
 
25
  <div class="content-column">
includes/ui/tabs/overview.php CHANGED
@@ -31,15 +31,21 @@ $diagnostics = $roc->get_diagnostics();
31
  <code><?php echo esc_html( $redis_client ); ?></code>
32
 
33
  <?php if ( stripos( (string) $redis_client, 'predis' ) === 0 ) : ?>
34
- <?php if ( version_compare( phpversion(), '7.2', '<' ) ) : ?>
35
- <p class="description is-notice">
36
- <?php esc_html_e( 'The Predis library is no longer maintained. Consider switching over to Credis or PhpRedis to avoid compatiblity issues in the future.', 'redis-cache' ); ?>
37
- </p>
38
- <?php else : ?>
39
- <p class="description is-notice">
40
- <?php esc_html_e( 'The Predis library is not reliable on PHP 7.2 and newer. Consider switching over to Credis or PhpRedis to avoid compatiblity issues.', 'redis-cache' ); ?>
41
- </p>
42
- <?php endif; ?>
 
 
 
 
 
 
43
  <?php endif; ?>
44
  </td>
45
  </tr>
31
  <code><?php echo esc_html( $redis_client ); ?></code>
32
 
33
  <?php if ( stripos( (string) $redis_client, 'predis' ) === 0 ) : ?>
34
+ <p class="description is-notice">
35
+ <?php if ( version_compare( phpversion(), '7.2', '<' ) ) : ?>
36
+ <?php _e( 'The Predis library is no longer maintained.', 'redis-cache' ); ?>
37
+ <?php else : ?>
38
+ <?php _e( 'The Predis library is not reliable on PHP 7.2 and newer.', 'redis-cache' ); ?>
39
+ <?php endif; ?>
40
+
41
+ <?php
42
+ printf(
43
+ // translators: %s = Link to the help article
44
+ __( 'Learn more about <a href="%s" target="_blank">migrating to Credis or PhpRedis</a> to avoid compatiblity issues in the future.', 'redis-cache' ),
45
+ 'https://github.com/rhubarbgroup/redis-cache/wiki/Predis'
46
+ );
47
+ ?>
48
+ </p>
49
  <?php endif; ?>
50
  </td>
51
  </tr>
languages/redis-cache.pot CHANGED
@@ -2,21 +2,21 @@
2
  # This file is distributed under the GPLv3.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Redis Object Cache 2.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/redis-cache\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-07-13T20:02:34+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: redis-cache\n"
16
 
17
  #. Plugin Name of the plugin
18
- #: includes/class-plugin.php:92
19
- #: includes/class-plugin.php:136
20
  #: includes/ui/settings.php:18
21
  msgid "Redis Object Cache"
22
  msgstr ""
@@ -37,152 +37,153 @@ msgstr ""
37
  msgid "https://wprediscache.com"
38
  msgstr ""
39
 
40
- #: includes/class-plugin.php:93
41
  msgid "Redis"
42
  msgstr ""
43
 
44
- #: includes/class-plugin.php:121
 
 
 
 
 
 
 
 
45
  #: includes/ui/tabs/overview.php:22
46
  msgid "Overview"
47
  msgstr ""
48
 
49
- #: includes/class-plugin.php:122
50
  msgid "Metrics"
51
  msgstr ""
52
 
53
- #: includes/class-plugin.php:123
54
  msgid "Diagnostics"
55
  msgstr ""
56
 
57
- #: includes/class-plugin.php:148
58
  msgid "Settings"
59
  msgstr ""
60
 
61
- #: includes/class-plugin.php:192
62
  #: includes/ui/tabs/metrics.php:17
63
  #: includes/ui/widget.php:16
64
  msgid "Time"
65
  msgstr ""
66
 
67
- #: includes/class-plugin.php:193
68
  #: includes/ui/tabs/metrics.php:22
69
  #: includes/ui/widget.php:21
70
  msgid "Bytes"
71
  msgstr ""
72
 
73
- #: includes/class-plugin.php:194
74
  #: includes/ui/tabs/metrics.php:27
75
  #: includes/ui/widget.php:26
76
  msgid "Ratio"
77
  msgstr ""
78
 
79
- #: includes/class-plugin.php:195
80
  #: includes/ui/tabs/metrics.php:32
81
  #: includes/ui/widget.php:31
82
  msgid "Calls"
83
  msgstr ""
84
 
85
- #: includes/class-plugin.php:196
86
  msgid "Not enough data collected, yet."
87
  msgstr ""
88
 
89
- #: includes/class-plugin.php:197
90
  msgid "Enable object cache to collect data."
91
  msgstr ""
92
 
93
- #: includes/class-plugin.php:292
94
  #: includes/class-qm-collector.php:48
95
- #: includes/cli/class-commands.php:40
96
  msgid "Disabled"
97
  msgstr ""
98
 
99
- #: includes/class-plugin.php:297
100
- #: includes/cli/class-commands.php:43
101
  msgid "Connected"
102
  msgstr ""
103
 
104
- #: includes/class-plugin.php:301
105
- #: includes/cli/class-commands.php:46
106
  msgid "Not Connected"
107
  msgstr ""
108
 
109
- #: includes/class-plugin.php:305
110
- #: includes/ui/tabs/overview.php:240
111
  msgid "Unknown"
112
  msgstr ""
113
 
114
  #. translators: %s = Action link to update the drop-in
115
- #: includes/class-plugin.php:385
116
  msgid "The Redis object cache drop-in is outdated. Please <a href=\"%s\">update the drop-in</a>."
117
  msgstr ""
118
 
119
  #. translators: %s = Action link to update the drop-in
120
- #: includes/class-plugin.php:389
121
  msgid "A foreign object cache drop-in was found. To use Redis for object caching, please <a href=\"%s\">enable the drop-in</a>."
122
  msgstr ""
123
 
124
- #: includes/class-plugin.php:401
125
- msgid "This plugin requires PHP 5.4 or greater."
 
 
 
 
126
  msgstr ""
127
 
128
- #: includes/class-plugin.php:408
129
- #: includes/cli/class-commands.php:87
130
  msgid "Object cache enabled."
131
  msgstr ""
132
 
133
- #: includes/class-plugin.php:411
134
- #: includes/cli/class-commands.php:89
135
  msgid "Object cache could not be enabled."
136
  msgstr ""
137
 
138
- #: includes/class-plugin.php:414
139
- #: includes/cli/class-commands.php:126
140
  msgid "Object cache disabled."
141
  msgstr ""
142
 
143
- #: includes/class-plugin.php:417
144
- #: includes/cli/class-commands.php:128
145
  msgid "Object cache could not be disabled."
146
  msgstr ""
147
 
148
- #: includes/class-plugin.php:420
149
- msgid "Object cache flushed."
150
- msgstr ""
151
-
152
- #: includes/class-plugin.php:423
153
- msgid "Object cache could not be flushed."
154
- msgstr ""
155
-
156
- #: includes/class-plugin.php:426
157
- #: includes/cli/class-commands.php:153
158
  msgid "Updated object cache drop-in and enabled Redis object cache."
159
  msgstr ""
160
 
161
- #: includes/class-plugin.php:429
162
- #: includes/cli/class-commands.php:155
163
  msgid "Object cache drop-in could not be updated."
164
  msgstr ""
165
 
166
- #: includes/class-plugin.php:521
167
  msgid "Redis Cache Pro is out!"
168
  msgstr ""
169
 
170
  #. translators: %s = Link to the plugin setting screen
171
- #: includes/class-plugin.php:524
172
  msgid "A <u>business class</u> object cache backend. Truly reliable, highly-optimized and fully customizable, with a <u>dedicated engineer</u> when you most need it. <a href=\"%s\">Learn more »</a>"
173
  msgstr ""
174
 
175
- #: includes/class-plugin.php:555
176
  msgid "Redis Cache Pro + WooCommerce = ❤️"
177
  msgstr ""
178
 
179
  #. translators: %s = Link to the plugin's settings screen
180
- #: includes/class-plugin.php:558
181
  msgid "Redis Cache Pro is a <u>business class</u> object cache that’s highly-optimized for WooCommerce to provide true reliability, peace of mind and faster load times for your store. <a style=\"color: #bb77ae;\" href=\"%s\">Learn more »</a>"
182
  msgstr ""
183
 
184
  #. translators: %1$d = number of objects. %2$s = human-readable size of cache. %3$s = name of the used client.
185
- #: includes/class-plugin.php:668
186
  msgid "Retrieved %1$d objects (%2$s) from Redis using %3$s."
187
  msgstr ""
188
 
@@ -191,7 +192,7 @@ msgid "Object Cache"
191
  msgstr ""
192
 
193
  #: includes/class-qm-collector.php:48
194
- #: includes/ui/tabs/overview.php:70
195
  msgid "Yes"
196
  msgstr ""
197
 
@@ -203,16 +204,16 @@ msgstr ""
203
  msgid "WordPress is using a foreign object cache drop-in and Redis Object Cache is not being used. Use WP CLI or go to \"Settings -> Redis\" to enable drop-in."
204
  msgstr ""
205
 
206
- #: includes/cli/class-commands.php:78
207
  msgid "Redis object cache already enabled."
208
  msgstr ""
209
 
210
- #: includes/cli/class-commands.php:80
211
- #: includes/cli/class-commands.php:119
212
  msgid "A foreign object cache drop-in was found. To use Redis for object caching, run: `wp redis update-dropin`."
213
  msgstr ""
214
 
215
- #: includes/cli/class-commands.php:113
216
  msgid "No object cache drop-in found."
217
  msgstr ""
218
 
@@ -256,42 +257,42 @@ msgstr ""
256
  msgid "Metadata"
257
  msgstr ""
258
 
259
- #: includes/ui/settings.php:52
260
  msgid "Resources"
261
  msgstr ""
262
 
263
- #: includes/ui/settings.php:77
264
  msgid "Learn more"
265
  msgstr ""
266
 
267
- #: includes/ui/settings.php:90
268
  msgid "Your site meets the system requirements for the Pro version."
269
  msgstr ""
270
 
271
- #: includes/ui/settings.php:97
272
  msgid "Your site <i>does not</i> meet the requirements for the Pro version:"
273
  msgstr ""
274
 
275
  #. translators: %s = PHP Version.
276
- #: includes/ui/settings.php:106
277
  msgid "The current version of PHP (%s) is too old. PHP 7.0 or newer is required."
278
  msgstr ""
279
 
280
- #: includes/ui/settings.php:115
281
  msgid "The PhpRedis extension is not installed."
282
  msgstr ""
283
 
284
  #. translators: %s = Version of the PhpRedis extension.
285
- #: includes/ui/settings.php:122
286
  msgid "The current version of the PhpRedis extension (%s) is too old. PhpRedis 3.1.1 or newer is required."
287
  msgstr ""
288
 
289
- #: includes/ui/settings.php:138
290
- #: includes/ui/settings.php:152
291
  msgid "Support"
292
  msgstr ""
293
 
294
- #: includes/ui/settings.php:146
295
  msgid "Documentation"
296
  msgstr ""
297
 
@@ -300,120 +301,129 @@ msgid "Client:"
300
  msgstr ""
301
 
302
  #: includes/ui/tabs/overview.php:36
303
- msgid "The Predis library is no longer maintained. Consider switching over to Credis or PhpRedis to avoid compatiblity issues in the future."
 
 
 
 
304
  msgstr ""
305
 
306
- #: includes/ui/tabs/overview.php:40
307
- msgid "The Predis library is not reliable on PHP 7.2 and newer. Consider switching over to Credis or PhpRedis to avoid compatiblity issues."
 
308
  msgstr ""
309
 
310
- #: includes/ui/tabs/overview.php:49
311
  msgid "Drop-in:"
312
  msgstr ""
313
 
314
- #: includes/ui/tabs/overview.php:53
315
  msgid "Missing"
316
  msgstr ""
317
 
318
- #: includes/ui/tabs/overview.php:55
319
  msgid "Outdated"
320
  msgstr ""
321
 
322
- #: includes/ui/tabs/overview.php:58
323
  msgid "Valid"
324
  msgstr ""
325
 
326
- #: includes/ui/tabs/overview.php:59
327
  msgid "Invalid"
328
  msgstr ""
329
 
330
- #: includes/ui/tabs/overview.php:68
331
  msgid "Disabled:"
332
  msgstr ""
333
 
334
- #: includes/ui/tabs/overview.php:77
335
  msgid "Key Prefix:"
336
  msgstr ""
337
 
338
- #: includes/ui/tabs/overview.php:86
339
  msgid "Max. TTL:"
340
  msgstr ""
341
 
342
- #: includes/ui/tabs/overview.php:92
343
  msgid "This doesn’t appear to be a valid number."
344
  msgstr ""
345
 
346
- #: includes/ui/tabs/overview.php:102
347
  msgid "Connection"
348
  msgstr ""
349
 
350
- #: includes/ui/tabs/overview.php:108
351
  msgid "Status:"
352
  msgstr ""
353
 
354
- #: includes/ui/tabs/overview.php:114
355
  msgid "Host:"
356
  msgstr ""
357
 
358
- #: includes/ui/tabs/overview.php:121
359
  msgid "Cluster:"
360
  msgstr ""
361
 
362
- #: includes/ui/tabs/overview.php:134
363
  msgid "Shards:"
364
  msgstr ""
365
 
366
- #: includes/ui/tabs/overview.php:147
367
  msgid "Servers:"
368
  msgstr ""
369
 
370
- #: includes/ui/tabs/overview.php:160
371
  msgid "Port:"
372
  msgstr ""
373
 
374
- #: includes/ui/tabs/overview.php:167
 
 
 
 
375
  msgid "Password:"
376
  msgstr ""
377
 
378
- #: includes/ui/tabs/overview.php:181
379
  msgid "Database:"
380
  msgstr ""
381
 
382
- #: includes/ui/tabs/overview.php:188
383
  msgid "Connection Timeout:"
384
  msgstr ""
385
 
386
  #. translators: %s = Redis connection/read timeout in seconds.
387
- #: includes/ui/tabs/overview.php:194
388
- #: includes/ui/tabs/overview.php:211
389
  msgid "%ss"
390
  msgstr ""
391
 
392
- #: includes/ui/tabs/overview.php:205
393
  msgid "Read Timeout:"
394
  msgstr ""
395
 
396
- #: includes/ui/tabs/overview.php:222
397
  msgid "Retry Interval:"
398
  msgstr ""
399
 
400
  #. translators: %s = Redis retry interval in milliseconds.
401
- #: includes/ui/tabs/overview.php:228
402
  msgid "%sms"
403
  msgstr ""
404
 
405
- #: includes/ui/tabs/overview.php:239
406
  msgid "Redis Version:"
407
  msgstr ""
408
 
409
- #: includes/ui/tabs/overview.php:249
410
  msgid "Flush Cache"
411
  msgstr ""
412
 
413
- #: includes/ui/tabs/overview.php:253
414
  msgid "Disable Object Cache"
415
  msgstr ""
416
 
417
- #: includes/ui/tabs/overview.php:255
418
  msgid "Enable Object Cache"
419
  msgstr ""
2
  # This file is distributed under the GPLv3.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Redis Object Cache 2.0.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/redis-cache\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-07-20T16:15:40+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: redis-cache\n"
16
 
17
  #. Plugin Name of the plugin
18
+ #: includes/class-plugin.php:105
19
+ #: includes/class-plugin.php:176
20
  #: includes/ui/settings.php:18
21
  msgid "Redis Object Cache"
22
  msgstr ""
37
  msgid "https://wprediscache.com"
38
  msgstr ""
39
 
40
+ #: includes/class-plugin.php:106
41
  msgid "Redis"
42
  msgstr ""
43
 
44
+ #: includes/class-plugin.php:128
45
+ msgid "Flush Object Cache"
46
+ msgstr ""
47
+
48
+ #: includes/class-plugin.php:131
49
+ msgid "Flush the Redis object cache"
50
+ msgstr ""
51
+
52
+ #: includes/class-plugin.php:157
53
  #: includes/ui/tabs/overview.php:22
54
  msgid "Overview"
55
  msgstr ""
56
 
57
+ #: includes/class-plugin.php:160
58
  msgid "Metrics"
59
  msgstr ""
60
 
61
+ #: includes/class-plugin.php:163
62
  msgid "Diagnostics"
63
  msgstr ""
64
 
65
+ #: includes/class-plugin.php:188
66
  msgid "Settings"
67
  msgstr ""
68
 
69
+ #: includes/class-plugin.php:246
70
  #: includes/ui/tabs/metrics.php:17
71
  #: includes/ui/widget.php:16
72
  msgid "Time"
73
  msgstr ""
74
 
75
+ #: includes/class-plugin.php:247
76
  #: includes/ui/tabs/metrics.php:22
77
  #: includes/ui/widget.php:21
78
  msgid "Bytes"
79
  msgstr ""
80
 
81
+ #: includes/class-plugin.php:248
82
  #: includes/ui/tabs/metrics.php:27
83
  #: includes/ui/widget.php:26
84
  msgid "Ratio"
85
  msgstr ""
86
 
87
+ #: includes/class-plugin.php:249
88
  #: includes/ui/tabs/metrics.php:32
89
  #: includes/ui/widget.php:31
90
  msgid "Calls"
91
  msgstr ""
92
 
93
+ #: includes/class-plugin.php:250
94
  msgid "Not enough data collected, yet."
95
  msgstr ""
96
 
97
+ #: includes/class-plugin.php:251
98
  msgid "Enable object cache to collect data."
99
  msgstr ""
100
 
101
+ #: includes/class-plugin.php:354
102
  #: includes/class-qm-collector.php:48
 
103
  msgid "Disabled"
104
  msgstr ""
105
 
106
+ #: includes/class-plugin.php:359
 
107
  msgid "Connected"
108
  msgstr ""
109
 
110
+ #: includes/class-plugin.php:363
 
111
  msgid "Not Connected"
112
  msgstr ""
113
 
114
+ #: includes/class-plugin.php:367
115
+ #: includes/ui/tabs/overview.php:248
116
  msgid "Unknown"
117
  msgstr ""
118
 
119
  #. translators: %s = Action link to update the drop-in
120
+ #: includes/class-plugin.php:446
121
  msgid "The Redis object cache drop-in is outdated. Please <a href=\"%s\">update the drop-in</a>."
122
  msgstr ""
123
 
124
  #. translators: %s = Action link to update the drop-in
125
+ #: includes/class-plugin.php:450
126
  msgid "A foreign object cache drop-in was found. To use Redis for object caching, please <a href=\"%s\">enable the drop-in</a>."
127
  msgstr ""
128
 
129
+ #: includes/class-plugin.php:480
130
+ msgid "Object cache flushed."
131
+ msgstr ""
132
+
133
+ #: includes/class-plugin.php:486
134
+ msgid "Object cache could not be flushed."
135
  msgstr ""
136
 
137
+ #: includes/class-plugin.php:508
138
+ #: includes/cli/class-commands.php:74
139
  msgid "Object cache enabled."
140
  msgstr ""
141
 
142
+ #: includes/class-plugin.php:514
143
+ #: includes/cli/class-commands.php:76
144
  msgid "Object cache could not be enabled."
145
  msgstr ""
146
 
147
+ #: includes/class-plugin.php:527
148
+ #: includes/cli/class-commands.php:113
149
  msgid "Object cache disabled."
150
  msgstr ""
151
 
152
+ #: includes/class-plugin.php:532
153
+ #: includes/cli/class-commands.php:115
154
  msgid "Object cache could not be disabled."
155
  msgstr ""
156
 
157
+ #: includes/class-plugin.php:551
158
+ #: includes/cli/class-commands.php:147
 
 
 
 
 
 
 
 
159
  msgid "Updated object cache drop-in and enabled Redis object cache."
160
  msgstr ""
161
 
162
+ #: includes/class-plugin.php:557
163
+ #: includes/cli/class-commands.php:149
164
  msgid "Object cache drop-in could not be updated."
165
  msgstr ""
166
 
167
+ #: includes/class-plugin.php:610
168
  msgid "Redis Cache Pro is out!"
169
  msgstr ""
170
 
171
  #. translators: %s = Link to the plugin setting screen
172
+ #: includes/class-plugin.php:613
173
  msgid "A <u>business class</u> object cache backend. Truly reliable, highly-optimized and fully customizable, with a <u>dedicated engineer</u> when you most need it. <a href=\"%s\">Learn more »</a>"
174
  msgstr ""
175
 
176
+ #: includes/class-plugin.php:644
177
  msgid "Redis Cache Pro + WooCommerce = ❤️"
178
  msgstr ""
179
 
180
  #. translators: %s = Link to the plugin's settings screen
181
+ #: includes/class-plugin.php:647
182
  msgid "Redis Cache Pro is a <u>business class</u> object cache that’s highly-optimized for WooCommerce to provide true reliability, peace of mind and faster load times for your store. <a style=\"color: #bb77ae;\" href=\"%s\">Learn more »</a>"
183
  msgstr ""
184
 
185
  #. translators: %1$d = number of objects. %2$s = human-readable size of cache. %3$s = name of the used client.
186
+ #: includes/class-plugin.php:765
187
  msgid "Retrieved %1$d objects (%2$s) from Redis using %3$s."
188
  msgstr ""
189
 
192
  msgstr ""
193
 
194
  #: includes/class-qm-collector.php:48
195
+ #: includes/ui/tabs/overview.php:76
196
  msgid "Yes"
197
  msgstr ""
198
 
204
  msgid "WordPress is using a foreign object cache drop-in and Redis Object Cache is not being used. Use WP CLI or go to \"Settings -> Redis\" to enable drop-in."
205
  msgstr ""
206
 
207
+ #: includes/cli/class-commands.php:58
208
  msgid "Redis object cache already enabled."
209
  msgstr ""
210
 
211
+ #: includes/cli/class-commands.php:60
212
+ #: includes/cli/class-commands.php:106
213
  msgid "A foreign object cache drop-in was found. To use Redis for object caching, run: `wp redis update-dropin`."
214
  msgstr ""
215
 
216
+ #: includes/cli/class-commands.php:100
217
  msgid "No object cache drop-in found."
218
  msgstr ""
219
 
257
  msgid "Metadata"
258
  msgstr ""
259
 
260
+ #: includes/ui/settings.php:54
261
  msgid "Resources"
262
  msgstr ""
263
 
264
+ #: includes/ui/settings.php:79
265
  msgid "Learn more"
266
  msgstr ""
267
 
268
+ #: includes/ui/settings.php:92
269
  msgid "Your site meets the system requirements for the Pro version."
270
  msgstr ""
271
 
272
+ #: includes/ui/settings.php:99
273
  msgid "Your site <i>does not</i> meet the requirements for the Pro version:"
274
  msgstr ""
275
 
276
  #. translators: %s = PHP Version.
277
+ #: includes/ui/settings.php:108
278
  msgid "The current version of PHP (%s) is too old. PHP 7.0 or newer is required."
279
  msgstr ""
280
 
281
+ #: includes/ui/settings.php:117
282
  msgid "The PhpRedis extension is not installed."
283
  msgstr ""
284
 
285
  #. translators: %s = Version of the PhpRedis extension.
286
+ #: includes/ui/settings.php:124
287
  msgid "The current version of the PhpRedis extension (%s) is too old. PhpRedis 3.1.1 or newer is required."
288
  msgstr ""
289
 
290
+ #: includes/ui/settings.php:140
291
+ #: includes/ui/settings.php:154
292
  msgid "Support"
293
  msgstr ""
294
 
295
+ #: includes/ui/settings.php:148
296
  msgid "Documentation"
297
  msgstr ""
298
 
301
  msgstr ""
302
 
303
  #: includes/ui/tabs/overview.php:36
304
+ msgid "The Predis library is no longer maintained."
305
+ msgstr ""
306
+
307
+ #: includes/ui/tabs/overview.php:38
308
+ msgid "The Predis library is not reliable on PHP 7.2 and newer."
309
  msgstr ""
310
 
311
+ #. translators: %s = Link to the help article
312
+ #: includes/ui/tabs/overview.php:44
313
+ msgid "Learn more about <a href=\"%s\" target=\"_blank\">migrating to Credis or PhpRedis</a> to avoid compatiblity issues in the future."
314
  msgstr ""
315
 
316
+ #: includes/ui/tabs/overview.php:55
317
  msgid "Drop-in:"
318
  msgstr ""
319
 
320
+ #: includes/ui/tabs/overview.php:59
321
  msgid "Missing"
322
  msgstr ""
323
 
324
+ #: includes/ui/tabs/overview.php:61
325
  msgid "Outdated"
326
  msgstr ""
327
 
328
+ #: includes/ui/tabs/overview.php:64
329
  msgid "Valid"
330
  msgstr ""
331
 
332
+ #: includes/ui/tabs/overview.php:65
333
  msgid "Invalid"
334
  msgstr ""
335
 
336
+ #: includes/ui/tabs/overview.php:74
337
  msgid "Disabled:"
338
  msgstr ""
339
 
340
+ #: includes/ui/tabs/overview.php:83
341
  msgid "Key Prefix:"
342
  msgstr ""
343
 
344
+ #: includes/ui/tabs/overview.php:92
345
  msgid "Max. TTL:"
346
  msgstr ""
347
 
348
+ #: includes/ui/tabs/overview.php:98
349
  msgid "This doesn’t appear to be a valid number."
350
  msgstr ""
351
 
352
+ #: includes/ui/tabs/overview.php:108
353
  msgid "Connection"
354
  msgstr ""
355
 
356
+ #: includes/ui/tabs/overview.php:114
357
  msgid "Status:"
358
  msgstr ""
359
 
360
+ #: includes/ui/tabs/overview.php:120
361
  msgid "Host:"
362
  msgstr ""
363
 
364
+ #: includes/ui/tabs/overview.php:127
365
  msgid "Cluster:"
366
  msgstr ""
367
 
368
+ #: includes/ui/tabs/overview.php:140
369
  msgid "Shards:"
370
  msgstr ""
371
 
372
+ #: includes/ui/tabs/overview.php:153
373
  msgid "Servers:"
374
  msgstr ""
375
 
376
+ #: includes/ui/tabs/overview.php:166
377
  msgid "Port:"
378
  msgstr ""
379
 
380
+ #: includes/ui/tabs/overview.php:173
381
+ msgid "Username:"
382
+ msgstr ""
383
+
384
+ #: includes/ui/tabs/overview.php:180
385
  msgid "Password:"
386
  msgstr ""
387
 
388
+ #: includes/ui/tabs/overview.php:189
389
  msgid "Database:"
390
  msgstr ""
391
 
392
+ #: includes/ui/tabs/overview.php:196
393
  msgid "Connection Timeout:"
394
  msgstr ""
395
 
396
  #. translators: %s = Redis connection/read timeout in seconds.
397
+ #: includes/ui/tabs/overview.php:202
398
+ #: includes/ui/tabs/overview.php:219
399
  msgid "%ss"
400
  msgstr ""
401
 
402
+ #: includes/ui/tabs/overview.php:213
403
  msgid "Read Timeout:"
404
  msgstr ""
405
 
406
+ #: includes/ui/tabs/overview.php:230
407
  msgid "Retry Interval:"
408
  msgstr ""
409
 
410
  #. translators: %s = Redis retry interval in milliseconds.
411
+ #: includes/ui/tabs/overview.php:236
412
  msgid "%sms"
413
  msgstr ""
414
 
415
+ #: includes/ui/tabs/overview.php:247
416
  msgid "Redis Version:"
417
  msgstr ""
418
 
419
+ #: includes/ui/tabs/overview.php:257
420
  msgid "Flush Cache"
421
  msgstr ""
422
 
423
+ #: includes/ui/tabs/overview.php:261
424
  msgid "Disable Object Cache"
425
  msgstr ""
426
 
427
+ #: includes/ui/tabs/overview.php:263
428
  msgid "Enable Object Cache"
429
  msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: redis, predis, phpredis, credis, hhvm, pecl, caching, cache, object cache,
5
  Requires at least: 3.3
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
- Stable tag: 2.0.4
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -83,10 +83,18 @@ To see a list of all available WP-CLI commands, please see the [WP CLI commands
83
 
84
  == Changelog ==
85
 
86
- = 2.0.4 =
87
 
88
  Version 2.0 is a significant rewrite of the plugin. Please read the v2.0.0 release notes.
89
 
 
 
 
 
 
 
 
 
90
  - Attempt to reliably update the dropin when it's outdated
91
  - Show ACL username on settings screen
92
  - Show full diagnostics with `wp redis status`
@@ -400,7 +408,7 @@ Since Predis isn't maintained any longer, it's highly recommended to switch over
400
 
401
  == Upgrade Notice ==
402
 
403
- = 2.0.4 =
404
 
405
  Version 2.0 is a significant rewrite of the plugin. Please read the v2.0.0 release notes.
406
 
5
  Requires at least: 3.3
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
+ Stable tag: 2.0.5
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
83
 
84
  == Changelog ==
85
 
86
+ = 2.0.5 =
87
 
88
  Version 2.0 is a significant rewrite of the plugin. Please read the v2.0.0 release notes.
89
 
90
+ - Fixed multisite action buttons not working
91
+ - Removed outdated PHP 5.4 warning
92
+ - Added `read_timeout` support to Credis
93
+ - Display connection parameters when using Credis
94
+ - Added wiki link to Predis upgrade notice
95
+
96
+ = 2.0.4 =
97
+
98
  - Attempt to reliably update the dropin when it's outdated
99
  - Show ACL username on settings screen
100
  - Show full diagnostics with `wp redis status`
408
 
409
  == Upgrade Notice ==
410
 
411
+ = 2.0.5 =
412
 
413
  Version 2.0 is a significant rewrite of the plugin. Please read the v2.0.0 release notes.
414
 
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.4
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.5
7
  * Text Domain: redis-cache
8
  * Domain Path: /languages
9
  * Network: true