Skip to content
Snippets Groups Projects

Issue #2765895: Currently Drush Cr or Cache Clear UI does not flush Redis cache

Files
2
+ 15
2
@@ -244,17 +244,19 @@ three different implementations of the flush algorithm you can use:
You can configure a default flush mode which will override the sensible
provided defaults by setting the 'redis_flush_mode' variable.
```
// For example this is the safer mode.
$conf['redis_flush_mode'] = 1;
```
But you may also want to change the behavior for only a few bins.
```
// This will put mode 0 on "bootstrap" bin.
$conf['redis_flush_mode_cache_bootstrap'] = 0;
// And mode 2 to "page" bin.
$conf['redis_flush_mode_cache_page'] = 2;
```
Note that you must prefix your bins with "cache" as the Drupal 7 bin naming
convention requires it.
@@ -262,6 +264,17 @@ convention requires it.
Keep in mind that defaults will provide the best balance between performance
and safety for most sites; Non-advanced users should ever change them.
Also, you can set flush_redis_on_drupal_flush_cache to TRUE to flush Redis cache when clearing all Drupal cache.
$settings['flush_redis_on_drupal_flush_cache'] = TRUE;
You can set flushdb and flushdb_async to TRUE to use the Redis native flushDB when clearing Drupal cache.
$settings['redis_flushdb'] = TRUE;
$settings['redis_flushdb_async'] = TRUE;
You need to set a redis base properly to use this feature. By default, Redis gets cleared getting all keys using cache_prefix. This is not recommended on production as it could be an expensive task to clear all the keys.
Default lifetime for permanent items
------------------------------------
Loading