8000 [Cache] Fixed not supported Redis eviction policies · symfony/symfony@9faefec · GitHub
[go: up one dir, main page]

Skip to content

Commit 9faefec

Browse files
[Cache] Fixed not supported Redis eviction policies
1 parent 1bc3ee7 commit 9faefec

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
use Predis\Connection\Aggregate\ClusterInterface;
1515
use Predis\Connection\Aggregate\PredisCluster;
1616
use Predis\Response\Status;
17-
use Symfony\Component\Cache\CacheItem;
1817
use Symfony\Component\Cache\Exception\InvalidArgumentException;
18+
use Symfony\Component\Cache\Exception\LogicException;
1919
use Symfony\Component\Cache\Marshaller\DeflateMarshaller;
2020
use Symfony\Component\Cache\Marshaller\MarshallerInterface;
2121
use Symfony\Component\Cache\Marshaller\TagAwareMarshaller;
@@ -95,9 +95,7 @@ protected function doSave(array $values, ?int $lifetime, array $addTagData = [],
9595
{
9696
$eviction = $this->getRedisEvictionPolicy();
9797
if ('noeviction' !== $eviction && 0 !== strpos($eviction, 'volatile-')) {
98-
CacheItem::log($this->logger, sprintf('Redis maxmemory-policy setting "%s" is *not* supported by RedisTagAwareAdapter, use "noeviction" or "volatile-*" eviction policies', $eviction));
99-
100-
return false;
98+
throw new LogicException(sprintf('Redis maxmemory-policy setting "%s" is *not* supported by RedisTagAwareAdapter, use "noeviction" or "volatile-*" eviction policies', $eviction));
10199
}
102100

103101
// serialize values

0 commit comments

Comments
 (0)
0