User tests: Successful: Unsuccessful:
since the same redis can be used for cache + session (or other stuff) only keys that match the -cache- should be used
Pull Request for Issue #43718
this code would delete ALL keys that aren't in a group regardless of being a cache or not
e.g. deleting keys that handle session or any other stuff
if (strpos($key, $secret . self::CACHE_KEY . $group . '-') !== 0 && $mode !== 'group') {
static::$_redis->del($key);
the code
static::$_redis->keys('*' . self::CACHE_KEY . '*');
instead of
static::$_redis->keys('*');
makes sure redis cache ONLY handles cache keys
redis-cli -h <host name>
HOST-NAME:PORT>monitor
and you'll see after a while these commands:
HOST-NAME:PORT>KEYS "*"
HOST-NAME:PORT>DEL <session-id 1>
HOST-NAME:PORT>DEL <session-id 2>
HOST-NAME:PORT>DEL <session-id 3>
....
seeing the
HOST-NAME:PORT>KEYS "*"
HOST-NAME:PORT>DEL <session-id 1>
HOST-NAME:PORT>DEL <session-id 2>
HOST-NAME:PORT>DEL <session-id 3>
....
not seeing
HOST-NAME:PORT>KEYS "*"
HOST-NAME:PORT>DEL <session-id 1>
HOST-NAME:PORT>DEL <session-id 2>
HOST-NAME:PORT>DEL <session-id 3>
....
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
PR-4.4-dev
|
do I need to do anything in order for this to be approved / merged ?
do I need to do anything in order for this to be approved / merged ?
Like every PR, this needs 2 successful human tests before it can be set to RTC (ready to commit) and then be merged.
Test results have to be reported on the issue tracker https://issues.joomla.org/tracker/joomla-cms/43719 by using the blue "Test this" button.
Ah, and the author should not be one of the 2 testers as the author should already have tested their fix before proposing it.
This pull request has been automatically rebased to 5.3-dev.