Add missing stream key prefixes (#1230)

* Added missing stream key prefixes

* Tested stream command key prefixing
This commit is contained in:
Jess Archer
2023-03-30 00:03:45 +10:00
committed by GitHub
parent 0e019cc08d
commit 98d4f80263
2 changed files with 31 additions and 0 deletions
@@ -181,9 +181,11 @@ class KeyPrefixProcessor implements ProcessorInterface
/* ---------------- Redis 5.0 ---------------- */
'XADD' => $prefixFirst,
'XRANGE' => $prefixFirst,
'XREVRANGE' => $prefixFirst,
'XDEL' => $prefixFirst,
'XLEN' => $prefixFirst,
'XACK' => $prefixFirst,
'XTRIM' => $prefixFirst,
];
}
@@ -944,6 +944,35 @@ class KeyPrefixProcessorTest extends PredisTestCase
['key', 'member', '100', 'km', 'WITHDIST', 'STORE', 'key:store', 'STOREDIST', 'key:storedist'],
['prefix:key', 'member', '100', 'km', 'WITHDIST', 'STORE', 'prefix:key:store', 'STOREDIST', 'prefix:key:storedist'],
],
/* ---------------- Redis 5.0 ---------------- */
['XADD',
['key', '*', ['field' => 'value']],
['prefix:key', '*', ['field' => 'value']],
],
['XRANGE',
['key', '-', '+'],
['prefix:key', '-', '+'],
],
['XREVRANGE',
['key', '+', '-'],
['prefix:key', '+', '-'],
],
['XDEL',
['key', 'id'],
['prefix:key', 'id'],
],
['XLEN',
['key'],
['prefix:key'],
],
['XACK',
['key', 'group', 'id'],
['prefix:key', 'group', 'id'],
],
['XTRIM',
['key', 'MAXLEN', 100],
['prefix:key', 'MAXLEN', 100],
],
];
}
}