From d36b92cb03c620fe8e9cd2fa13c5c98a8b124030 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Fri, 19 Jun 2020 14:56:36 +0100 Subject: [PATCH] Switch Redis to use Sets instead of Lists --- src/Adapter/Redis/RedisCachePool.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Adapter/Redis/RedisCachePool.php b/src/Adapter/Redis/RedisCachePool.php index 1ca05f2c..f59707d8 100644 --- a/src/Adapter/Redis/RedisCachePool.php +++ b/src/Adapter/Redis/RedisCachePool.php @@ -145,7 +145,7 @@ protected function getDirectValue($key) */ protected function appendListItem($name, $value) { - $this->cache->lPush($name, $value); + $this->cache->sAdd($name, $value); } /** @@ -153,7 +153,7 @@ protected function appendListItem($name, $value) */ protected function getList($name) { - return $this->cache->lRange($name, 0, -1); + return $this->cache->sMembers($name); } /** @@ -169,6 +169,6 @@ protected function removeList($name) */ protected function removeListItem($name, $key) { - return $this->cache->lrem($name, $key, 0); + return $this->cache->sRem($name, $key, 0); } }