You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Make sure php-redis is 3.1.3 or higher configured for Redis classes
67
-
if (!$this->redisinstanceofPredis\Client && version_compare(phpversion('redis'), '3.1.3', '<')) {
68
-
thrownew \Exception('RedisTagAwareAdapter requries php-redis 3.1.3 or higher, alternatively use predis/predis');
72
+
if (!$this->redisinstanceof\Predis\ClientInterface && version_compare(phpversion('redis'), '3.1.3', '<')) {
73
+
thrownew \Exception('RedisTagAwareAdapter requries php-redis 3.1.3 or higher, alternatively use predis/predis, or upgrade ezsystems/symfony-tools to v1.1.x');
69
74
}
70
75
}
71
76
@@ -80,6 +85,11 @@ public function __construct($redisClient, string $namespace = '', int $defaultLi
80
85
*/
81
86
protectedfunctiondoSave(array$values, $lifetime)
82
87
{
88
+
$eviction = $this->getRedisEvictionPolicy();
89
+
if ('noeviction' !== $eviction && 0 !== strpos($eviction, 'volatile-')) {
90
+
thrownewLogicException(sprintf('Redis maxmemory-policy setting "%s" is *not* supported by RedisTagAwareAdapter, use "noeviction" or "volatile-*" eviction policies.', $eviction));
91
+
}
92
+
83
93
// Extract tag operations
84
94
$tagOperations = ['sAdd' => [], 'sRem' => []];
85
95
foreach ($valuesas$id => $value) {
@@ -183,4 +193,50 @@ public function doInvalidate(array $tagIds): bool
0 commit comments