forked from rhubarbgroup/redis-cache
-
Notifications
You must be signed in to change notification settings - Fork 1
/
readme.txt
479 lines (331 loc) · 16.3 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
=== Redis Object Cache ===
Contributors: tillkruess
Donate link: https://github.com/sponsors/tillkruss
Tags: redis, predis, phpredis, credis, hhvm, pecl, caching, cache, object cache, performance, replication, clustering, keydb
Requires at least: 3.3
Tested up to: 5.5
Requires PHP: 5.6
Stable tag: 2.0.15
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Credis, HHVM, replication, clustering and WP-CLI.
== Description ==
A persistent object cache backend powered by Redis. Supports [Predis](https://github.com/nrk/predis/), [PhpRedis (PECL)](https://github.com/phpredis/phpredis), [Credis](https://github.com/colinmollenhour/credis), [HHVM](https://github.com/facebook/hhvm/tree/master/hphp/system/php/redis), replication, clustering and [WP-CLI](http://wp-cli.org/).
To adjust the connection parameters, prefix cache keys or configure replication/clustering, please see [Other Notes](http://wordpress.org/extend/plugins/redis-cache/other_notes/).
= Object Cache Pro =
A **business class** Redis object cache backend. Truly reliable, highly optimized, fully customizable and with a dedicated engineer when you most need it.
* Rewritten for raw performance
* 100% WordPress API compliant
* Faster serialization and compression
* Easy debugging & logging
* Cache analytics and preloading
* Fully unit tested (100% code coverage)
* Secure connections with TLS
* Health checks via WordPress & WP CLI
* Optimized for WooCommerce, Jetpack & Yoast SEO
Learn more about [Object Cache Pro](https://objectcache.pro/?utm_source=wp-plugin&utm_medium=readme).
== Installation ==
For detailed installation instructions, please read the [standard installation procedure for WordPress plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).
1. Make sure [Redis is installed and running](http://redis.io/topics/quickstart).
2. Install and activate plugin.
3. Enable the object cache under _Settings -> Redis_, or in Multisite setups under _Network Admin -> Settings -> Redis_.
4. If necessary, adjust [connection parameters](http://wordpress.org/extend/plugins/redis-cache/other_notes/).
If your server doesn't support the [WordPress Filesystem API](https://codex.wordpress.org/Filesystem_API), you have to manually copy the `object-cache.php` file from the `/plugins/redis-cache/includes/` directory to the `/wp-content/` directory.
== Connection Parameters ==
By default the object cache drop-in will connect to Redis over TCP at `127.0.0.1:6379` and select database `0`.
To adjust the connection parameters, client, timeouts and intervals, please see the [connection parameters wiki page](https://github.com/rhubarbgroup/redis-cache/wiki/Connection-Parameters).
== Configuration Options ==
The plugin comes with quite a few configuration options, such as key prefixes, a maximum time-to-live for keys, ignored group and many more.
Please see the [configuration options wiki page](https://github.com/rhubarbgroup/redis-cache/wiki/Configuration-Options) for a full list.
== Replication & Clustering ==
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.
Please see the [replication & clustering wiki page](https://github.com/rhubarbgroup/redis-cache/wiki/Replication-&-Clustering) for more information.
== WP-CLI Commands ==
To see a list of all available WP-CLI commands, please see the [WP CLI commands wiki page](https://github.com/rhubarbgroup/redis-cache/wiki/WP-CLI-Commands).
== Screenshots ==
1. Plugin settings, connected to a single Redis server.
2. Plugin settings, displaying recent response time metrics.
3. Plugin settings, showing diagnostic information.
4. Dashboard widget, displaying recent response time metrics.
== Changelog ==
= 2.0.15 =
- Reverted `build_key()` changes due to issues in multisite environments
= 2.0.14 =
- Made Object Cache Pro card translatable
- Added `WP_REDIS_SERIALIZER` to diagnostics
- Improved speed of `build_key()`
- Support settings `WP_REDIS_PREFIX` and `WP_REDIS_SELECTIVE_FLUSH` via environment variable
- Added `WP_REDIS_METRICS_MAX_TIME` to adjust stored metrics timeframe
- Delay loading of text domain and schedule until `init` hook
- Upgraded bundled Predis library to v1.1.6
- Prevent variable referencing issue in `connect_using_credis()`
= 2.0.13 =
- Updated bundled Predis library to v1.1.4
- Made `redis-cache` a global group for improved metrics on multisite
- Switched to short array syntax
- Added `@since` tags to all hooks
- Use `parse_url()` instead of `wp_parse_url()` in drop-in
- Fixed plugin instance variable name in `wp redis status`
= 2.0.12 =
- Fixed bytes metrics calculation
- Fixed an issue with non-standard Predis configurations
- Improve WordPress Coding Standards
= 2.0.11 =
- Fixed an issue in `wp_cache_get_multiple()` when using Predis
- Prevent undefined index notice in diagnostics
= 2.0.10 =
- Fixed unserializing values in `wp_cache_get_multiple()`
= 2.0.9 =
- Highlight current metric type using color
- Show "Metrics" tab when metrics are disabled
- Refactored connection and Redis status logic
- Updated Predis to v1.1.2
- Remove Predis deprecation notice
- Fixed fetching derived keys in `wp_cache_get_multiple()`
= 2.0.8 =
- Fixed tabs not working in 2.0.6 and 2.0.7 due to WP.org SVN issue
= 2.0.7 =
- Fixed issue with `wp_cache_get_multiple()`
= 2.0.6 =
- Added experimental filesystem test to diagnostics
- Refactored settings tab logic (fixed jumping, too)
- Fixed issues with `wp_cache_get_multiple()`
- Return boolean from `wp_cache_delete()`
- Use `redis-cache` as JS event namespace
- Hide Pro line in widget when banners are disabled
- Renamed `redis_object_cache_get_multi` action to `redis_object_cache_get_multiple`
= 2.0.5 =
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
= 2.0.4 =
- Attempt to reliably update the dropin when it's outdated
- Show ACL username on settings screen
- Show full diagnostics with `wp redis status`
- Always set `FS_CHMOD_FILE` when copying the `object-cache.php`
- Don't encode bullets in password diagnostics
- Call `redis_object_cache_update_dropin` during dropin update
= 2.0.3 =
- Hide "Metrics" tab when metrics are disabled
- Fixed `admin.js` not loading in multisite environments
- Avoid fatal error when interacting with metrics but Redis went away
- Added `WP_Object_Cache::__get()` for backwards compatibility
= 2.0.2 =
- Updated POT file and comments for translators
= 2.0.1 =
- Support older versions of Query Monitor
- Made "Dropin" status more helpful
- Hide Redis version in settings when it isn't available
- Collapsed dependency paths using `composer-custom-directory-installer` package
- Prevent `QM_Collector` conflicts with other plugins
- Prevent metric issues when cache is not available
- Fixed "Settings" link in plugin list
- Fixed `WP_REDIS_DISABLED` logic
= 2.0.0 =
Version 2.0 is a significant rewrite. The plugin now requires PHP 5.6, just like WordPress 5.2 does.
The GitHub and Composer repository was moved from `tillkruss/redis-cache` to `rhubarbgroup/redis-cache`.
On multisite networks, be sure to "Network Activate" the plugin after upgrading to v2.x.
- Require PHP 5.6
- Plugin is now "network-only"
- Switch to WPCS for code standards
- Overhauled the settings screen
- Added object cache metrics (on dashboard widget and settings)
- Added support for Query Monitor
- Added `Rhubarb\RedisCache` namespace to all files
- Added support for WP 5.5's new `wp_cache_get_multi()` function
- Added `redis_object_cache()` function to retrieve plugin instance
- Added dropin warnings to network dashboard
- Added support for setting Sentinel database numbers
- Support Redis 6 ACL username and password authentication
- Support overwriting existing dropin on setting screen
- Use singleton pattern to instantiate plugin
- Use Composer to install and load Predis
- Update object cache dropin during plugin update
- Use separate methods to connect with all clients
- Removed `CUSTOM_USER_TABLE` and `CUSTOM_USER_META_TABLE` weirdness
- Added `themes` as ignored group
- Changed default connection and read timeout to 1 second
- Prevent race condition in `add_or_replace()`
- Renamed `WP_CACHE_KEY_SALT` to `WP_REDIS_PREFIX` for clarity
- Replaced "slave" terminology with "replica"
- Only `SELECT` database when it's not `0`
= 1.6.1 =
- Fixed issue with footer comment showing during AJAX requests
= 1.6.0 =
- Improved group name sanitization (thanks @naxvog)
- Prevent fatal error when replacing foreign dropin
- Added HTML footer comment with optional debug information
- Removed prefix suggestions
_The HTML footer comment only prints debug information when `WP_DEBUG` is enabled. To disable the comment entirely, set the `WP_REDIS_DISABLE_COMMENT` constant to `true`._
= 1.5.9 =
- Fixed missing `$info` variable assignment in constructor
- Fixed MaxTTL warning condition
- Switched to using default button styles
= 1.5.8 =
- Added warning message about invalid MaxTTL
- Added warning about unmaintained Predis library
- Added suggestion about shorter, human-readable prefixes
- Added Redis Cache Pro compatibility to settings
- Fixed flushing the cache when the prefix contains special characters
- Fixed calling Redis `INFO` when using clusters
- Cleaned up the settings a little bit
= 1.5.7 =
- Added support for PhpRedis TLS connections
- Added support for timeout, read timeout and password when using PhpRedis cluster
- Fixed issue with `INFO` command
- Fixed object cloning when setting cache keys
= 1.5.6 =
- Added object cloning to in-memory cache
- Fixed PHP notice related to `read_timeout` parameter
= 1.5.5 =
Please flush the object cache after updating the drop to v1.5.5 to avoid dead keys filling up Redis memory.
* Removed lowercasing keys
* Remove scheduled metrics event
* Fixed Redis version call when using replication
= 1.5.4 =
* Removed metrics
= 1.5.3 =
* Fixed: Call to undefined function `get_plugin_data()`
* Fixed: Call to undefined method `WP_Object_Cache::redis_version()`
= 1.5.2 =
* Added Redis version to diagnostics
* Added `WP_REDIS_DISABLE_BANNERS` constant to disable promotions
* Fixed an issue with `redis.replicate_commands()`
= 1.5.1 =
This plugin turned 5 years today (Nov 14th) and its only fitting to release the business edition today as well.
[Object Cache Pro](https://objectcache.pro/) is a truly reliable, highly optimized and easy to debug rewrite of this plugin for SMBs.
* Added execution times to actions
* Added `WP_REDIS_VERSION` constant
* Fixed PhpRedis v3 compatibility
* Fixed an issue with selective flushing
* Fixed an issue with `mb_*` functions not existing
* Replaced Email Address Encoder card with Redis Cache Pro card
* Gather version metrics for better decision making
= 1.5.0 =
Since Predis isn't maintained any longer, it's highly recommended to switch over to PhpRedis (the Redis PECL extension).
* Improved Redis key name builder
* Added support for PhpRedis serializers
* Added `redis_object_cache_error` action
* Added timeout, read-timeout and retry configuration
* Added unflushable groups (defaults to `['userlogins']`)
* Fixed passwords not showing in server list
= 1.4.3 =
* Require PHP 5.4 or newer
* Use pretty print in diagnostics
* Throw exception if Redis library is missing
* Fixed cache not flushing for some users
* Fixed admin issues when `WP_REDIS_DISABLED` is `false`
= 1.4.2 =
* Added graceful Redis failures and `WP_REDIS_GRACEFUL` constant
* Improved cluster support
* Added `redis_cache_expiration` filter
* Renamed `redis_object_cache_get` filter to `redis_object_cache_get_value`
= 1.4.1 =
* Fixed potential fatal error related to `wp_suspend_cache_addition()`
= 1.4.0 =
* Added support for igbinary
* Added support for `wp_suspend_cache_addition()`
= 1.3.9 =
* Fixed `WP_REDIS_SHARDS` not showing up in server list
* Fixed `WP_REDIS_SHARDS` not working when using PECL extension
* Removed `WP_REDIS_SCHEME` and `WP_REDIS_PATH` leftovers
= 1.3.8 =
* Switched from single file Predis version to full library
= 1.3.7 =
* Revert back to single file Predis version
= 1.3.6 =
* Added support for Redis Sentinel
* Added support for sharing
* Switched to PHAR version of Predis
* Improved diagnostics
* Added `WP_REDIS_SELECTIVE_FLUSH`
* Added `$fail_gracefully` parameter to `WP_Object_Cache::__construct()`
* Always enforce `WP_REDIS_MAXTTL`
* Pass `$selective` and `$salt` to `redis_object_cache_flush` action
* Don’t set `WP_CACHE_KEY_SALT` constant
= 1.3.5 =
* Added basic diagnostics to admin interface
* Added `WP_REDIS_DISABLED` constant to disable cache at runtime
* Prevent "Invalid plugin header" error
* Return integer from `increment()` and `decrement()` methods
* Prevent object cache from being instantiated more than once
* Always separate cache key `prefix` and `group` by semicolon
* Improved performance of `build_key()`
* Only apply `redis_object_cache_get` filter if callbacks have been registered
* Fixed `add_or_replace()` to only set cache key if it doesn't exist
* Added `redis_object_cache_flush` action
* Added `redis_object_cache_enable` action
* Added `redis_object_cache_disable` action
* Added `redis_object_cache_update_dropin` action
= 1.3.4 =
* Added WP-CLI support
* Show host and port unless scheme is unix
* Updated default global and ignored groups
* Do a cache flush when activating, deactivating and uninstalling
= 1.3.3 =
* Updated Predis to `v1.1.1`
* Added `redis_instance()` method
* Added `incr()` method alias for Batcache compatibility
* Added `WP_REDIS_GLOBAL_GROUPS` and `WP_REDIS_IGNORED_GROUPS` constant
* Added `redis_object_cache_delete` action
* Use `WP_PLUGIN_DIR` with `WP_CONTENT_DIR` as fallback
* Set password when using a cluster or replication
* Show Redis client in `stats()`
* Change visibility of `$cache` to public
* Use old array syntax, just in case
= 1.3.2 =
* Make sure `$result` is not `false` in `WP_Object_Cache::get()`
= 1.3.1 =
* Fixed connection issue
= 1.3 =
* New admin interface
* Added support for `wp_cache_get()`'s `$force` and `$found` parameter
* Added support for clustering and replication with Predis
= 1.2.3 =
* UI improvements
= 1.2.2 =
* Added `redis_object_cache_set` action
* Added `redis_object_cache_get` action and filter
* Prevented duplicated admin status messages
* Load bundled Predis library only if necessary
* Load bundled Predis library using `WP_CONTENT_DIR` constant
* Updated `stats()` method output to be uniform with WordPress
= 1.2.1 =
* Added `composer.json`
* Added deactivation and uninstall hooks to delete `object-cache.php`
* Added local serialization functions for better `advanced-cache.php` support
* Updated bundled Predis version to `1.0.3`
* Updated heading structure to be semantic
= 1.2 =
* Added Multisite support
* Moved admin menu under _Settings_ menu
* Fixed PHP notice in `get_redis_client_name()`
= 1.1.1 =
* Call `select()` and optionally `auth()` if HHVM extension is used
= 1.1 =
* Added support for HHVM's Redis extension
* Added support for PECL Redis extension
* Added `WP_REDIS_CLIENT` constant, to set preferred Redis client
* Added `WP_REDIS_MAXTTL` constant, to force expiration of cache keys
* Improved `add_or_replace()`, `get()`, `set()` and `delete()` methods
* Improved admin screen styles
* Removed all internationalization/localization from drop-in
= 1.0.2 =
* Added "Flush Cache" button
* Added support for UNIX domain sockets
* Improved cache object retrieval performance significantly
* Updated bundled Predis library to version `1.0.1`
= 1.0.1 =
* Load plugin translations
* Hide global admin notices from non-admin users
* Prevent direct file access to `redis-cache.php` and `admin-page.php`
* Colorize "Disable Object Cache" button
* Call `Predis\Client->connect()` to avoid potential uncaught `Predis\Connection\ConnectionException`
= 1.0 =
* Initial release
== Upgrade Notice ==
= 2.0.15 =
Version 2.0 is a significant rewrite of the plugin. Please read the v2.0.0 release notes.