Skip to content

Commit 252a3a3

Browse files
authored
Add section on ignoring cache groups (#617)
1 parent b3d88d9 commit 252a3a3

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

FAQ.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ When in doubt try flushing the cache, you'd be surprised how often this resolves
44

55
- [HELP! My site is down!1!!11!!11](#help-my-site-is-down11111)
66
- [Plugin is incompatible with OtherPlugin](#plugin-is-incompatible-with-otherplugin)
7+
- [How can I ignore a cache group?](#how-can-i-ignore-a-cache-group)
8+
- [How can I exclude a page from the cache?](#how-can-i-exclude-a-page-from-the-cache)
79
- [Status: <code>Not connected</code>](#status-not-connected)
810
- [<code>connection timed out</code> and <code>read error on connection</code>](#connection-timed-out-and-read-error-on-connection)
9-
- [How can I exclude a page from the cache?](#how-can-i-exclude-a-page-from-the-cache)
1011
- [My site is getting redirected another domain](#my-site-is-getting-redirected-another-domain)
1112
- [Are transients stored in Redis?](#are-transients-stored-in-redis)
1213
- [I'm getting <code>404</code> errors](#im-getting-404-errors)
@@ -30,6 +31,22 @@ Unfortunately many plugin authors don't bother testing their plugins with a pers
3031

3132
This plugin is **not the issue**, it's just providing WordPress with `wp_cache_*()` functions for persistent caching.
3233

34+
## How can I ignore a cache group?
35+
36+
Some plugins don’t play nicely with a persistent object cache in WordPress and either cause stale cache data, or straight up break functionality. In such scenarios you might be able to exclude the faulty plugin's cache groups:
37+
38+
```php
39+
define( 'WP_REDIS_IGNORED_GROUPS', [
40+
'wpseo', // just an example
41+
] );
42+
```
43+
44+
## How can I exclude a page from the cache?
45+
46+
Object caching caches only **objects**, not **pages**. You cannot exclude a page from using the object cache, because object caching is not URL-centric. You also cannot exclude the WordPress admin dashboard from using object caching, because then you risk the cache going stale and even loosing data.
47+
48+
If you’re experiencing a compatibility issue with another plugin in combination with Redis Object Cache, please contact the support team of the plugin regarding the issue and ask them to ensure it's compatible with persistent object cache backends, like Redis.
49+
3350
## Status: <code>Not connected</code>
3451

3552
This means that either [Redis Server](https://redis.io) is not installed and running, or the plugin is not configured correctly.
@@ -57,12 +74,6 @@ If you moved all constants above those lines and the plugin still shows `Not Con
5774
## <code>connection timed out</code> and <code>read error on connection</code>
5875
If the error occurs rarely, ignore it, Redis Server is having a hiccup. If it persists, read the answer to "Status: <code>Not connected</code>".
5976

60-
## How can I exclude a page from the cache?
61-
62-
Object caching caches only **objects**, not **pages**. You cannot exclude a page from using the object cache, because object caching is not URL-centric. You also cannot exclude the WordPress admin dashboard from using object caching, because then you risk the cache going stale and even loosing data.
63-
64-
If you’re experiencing a compatibility issue with another plugin in combination with Redis Object Cache, please contact the support team of the plugin regarding the issue and ask them to ensure it's compatible with persistent object cache backends, like Redis.
65-
6677
## My site is getting redirected another domain
6778

6879
That happens when the same `WP_REDIS_DATABASE` index is used for multiple WordPress installations. You **MUST** set a separate `WP_REDIS_DATABASE` and `WP_REDIS_PREFIX` for each domain to avoid data collision.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The Redis Object Cache plugin comes with vast set of configuration options. If y
4242
| `WP_REDIS_CLIENT` | | The client used to communicate with Redis (defaults to `phpredis` when installed, otherwise `predis`), supports `phpredis`, `predis`, `relay` |
4343
| `WP_REDIS_TIMEOUT` | `1` | The connection timeout in seconds |
4444
| `WP_REDIS_READ_TIMEOUT` | `1` | The timeout in seconds when reading/writing |
45-
| `WP_REDIS_IGNORED_GROUPS` | `[]` | Groups that should not be cached between requests in Redis |
45+
| `WP_REDIS_IGNORED_GROUPS` | `[]` | Groups that should not be cached between requests in Redis ([read more](FAQ.md#how-can-i-ignore-a-cache-group)) |
4646

4747
<details>
4848
<summary>Advanced configuration options</summary>

0 commit comments

Comments
 (0)