Skip to content

Commit

Permalink
drop ignored groups
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss committed Nov 16, 2023
1 parent 06c71c9 commit 8974830
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- Call `redis_object_cache_error` action before `wp_die()`
- Allow `WP_REDIS_PLUGIN_PATH` to be defined elsewhere
- Added experimental flush timeout (defaults to `5` seconds)
- Swap out ignored `themes` for `theme_json` cache group
- Dropped unnecessary default ignored groups

## 2.4.4

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ Answers to common questions and troubleshooting of common errors can be found in

The Redis Object Cache plugin comes with vast set of configuration options. If you're unsure how to use them read the [installation instructions](INSTALL.md).

| Configuration constant | Default | Description |
| ------------------------------------ | ------------------------------------- | --------------------------------------------- |
| `WP_REDIS_HOST` | `127.0.0.1` | The hostname of the Redis server |
| `WP_REDIS_PORT` | `6379` | The port of the Redis server |
| `WP_REDIS_PATH` | | The path to the unix socket of the Redis server |
| `WP_REDIS_SCHEME` | `tcp` | The scheme used to connect: `tcp` or `unix` |
| `WP_REDIS_DATABASE` | `0` | The database used by the cache: `0-15` |
| `WP_REDIS_PREFIX` | | The prefix used for all cache keys to avoid data collisions (replaces `WP_CACHE_KEY_SALT`), should be human readable and not a "salt" |
| `WP_REDIS_PASSWORD` | | The password of the Redis server, supports Redis ACLs arrays: `['user', 'password']` |
| `WP_REDIS_MAXTTL` | `0` | The maximum time-to-live of cache keys |
| `WP_REDIS_CLIENT` | | The client used to communicate with Redis (defaults to `phpredis` when installed, otherwise `predis`), supports `phpredis`, `predis`, `relay` |
| `WP_REDIS_TIMEOUT` | `1` | The connection timeout in seconds |
| `WP_REDIS_READ_TIMEOUT` | `1` | The timeout in seconds when reading/writing |
| `WP_REDIS_IGNORED_GROUPS` | `['counts', 'plugins', 'theme_json']` | Groups that should not be cached between requests in Redis |
| Configuration constant | Default | Description |
| ------------------------------------ | ----------- | --------------------------------------------- |
| `WP_REDIS_HOST` | `127.0.0.1` | The hostname of the Redis server |
| `WP_REDIS_PORT` | `6379` | The port of the Redis server |
| `WP_REDIS_PATH` | | The path to the unix socket of the Redis server |
| `WP_REDIS_SCHEME` | `tcp` | The scheme used to connect: `tcp` or `unix` |
| `WP_REDIS_DATABASE` | `0` | The database used by the cache: `0-15` |
| `WP_REDIS_PREFIX` | | The prefix used for all cache keys to avoid data collisions (replaces `WP_CACHE_KEY_SALT`), should be human readable and not a "salt" |
| `WP_REDIS_PASSWORD` | | The password of the Redis server, supports Redis ACLs arrays: `['user', 'password']` |
| `WP_REDIS_MAXTTL` | `0` | The maximum time-to-live of cache keys |
| `WP_REDIS_CLIENT` | | The client used to communicate with Redis (defaults to `phpredis` when installed, otherwise `predis`), supports `phpredis`, `predis`, `relay` |
| `WP_REDIS_TIMEOUT` | `1` | The connection timeout in seconds |
| `WP_REDIS_READ_TIMEOUT` | `1` | The timeout in seconds when reading/writing |
| `WP_REDIS_IGNORED_GROUPS` | `[]` | Groups that should not be cached between requests in Redis |

<details>
<summary>Advanced configuration options</summary>
Expand Down
6 changes: 1 addition & 5 deletions includes/object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,7 @@ class WP_Object_Cache {
*
* @var array
*/
public $ignored_groups = [
'counts',
'plugins',
'theme_json',
];
public $ignored_groups = [];

/**
* List of groups and their types.
Expand Down
14 changes: 7 additions & 7 deletions languages/redis-cache.pot
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2023-11-16T19:49:00+00:00\n"
"POT-Creation-Date: 2023-11-16T20:42:18+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.9.0\n"
"X-Domain: redis-cache\n"
Expand Down Expand Up @@ -302,30 +302,30 @@ msgstr ""
msgid "Object cache drop-in could not be updated. Redis server is unreachable: %s"
msgstr ""

#: includes/object-cache.php:2918
#: includes/object-cache.php:2914
msgid "Error establishing a Redis connection"
msgstr ""

#. translators: %s = Formatted wp-config.php file name.
#: includes/object-cache.php:2925
#: includes/object-cache.php:2921
msgid "WordPress is unable to establish a connection to Redis. This means that the connection information in your %s file are incorrect, or that the Redis server is not reachable."
msgstr ""

#: includes/object-cache.php:2930
#: includes/object-cache.php:2926
msgid "Is the correct Redis host and port set?"
msgstr ""

#: includes/object-cache.php:2931
#: includes/object-cache.php:2927
msgid "Is the Redis server running?"
msgstr ""

#. translators: %s = Link to installation instructions.
#: includes/object-cache.php:2936
#: includes/object-cache.php:2932
msgid "If you need help, please read the <a href=\"%s\">installation instructions</a>."
msgstr ""

#. translators: %1$s = Formatted object-cache.php file name, %2$s = Formatted wp-content directory name.
#: includes/object-cache.php:2943
#: includes/object-cache.php:2939
msgid "To disable Redis, delete the %1$s file in the %2$s directory."
msgstr ""

Expand Down

0 comments on commit 8974830

Please sign in to comment.