return $success;
} private function getRedisEvictionPolicy(): string
{ if (isset($this->redisEvictionPolicy
)) { return $this->redisEvictionPolicy;
} $hosts =
$this->
getHosts();
$host =
reset($hosts);
if ($host instanceof \Predis\Client &&
$host->
getConnection() instanceof ReplicationInterface
) { // Predis supports info command only on the master in replication environments
$hosts =
[$host->
getClientFor('master'
)];
} foreach ($hosts as $host) { $info =
$host->
info('Memory'
);
if (false ===
$info || null ===
$info ||
$info instanceof ErrorInterface
) { continue;
}