diff --git a/src/Unleash.php b/src/Unleash.php index d4ca2f6..43b3340 100644 --- a/src/Unleash.php +++ b/src/Unleash.php @@ -37,8 +37,9 @@ public function getFeatures(): array try { $features = $this->getCachedFeatures(); - // Always store the failover cache, in case it is turned on during failure scenarios. - $this->cache->forever('unleash.features.failover', $features); + if ($this->config->get('unleash.cache.failover') === true) { + $this->cache->forever('unleash.features.failover', $features); + } return $features; } catch (TransferException | JsonException $e) {