Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9faefec

Browse filesBrowse files
[Cache] Fixed not supported Redis eviction policies
1 parent 1bc3ee7 commit 9faefec
Copy full SHA for 9faefec

File tree

1 file changed

+2
-4
lines changed
Filter options

1 file changed

+2
-4
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php
+2-4Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.