From 6d423cbb84ab123906edf292d18118cb07ca9dbf Mon Sep 17 00:00:00 2001 From: Andrew Nagy <564256+tm1000@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:49:57 -0800 Subject: [PATCH] (feat): Add back withUseCacheAsFailover At some point in the past withUseCacheAsFailover was removed but the property itself still exists in the class and it's referenced in the cache call so it should be settable. --- src/Flagsmith.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Flagsmith.php b/src/Flagsmith.php index 186a064..548bedb 100644 --- a/src/Flagsmith.php +++ b/src/Flagsmith.php @@ -254,6 +254,18 @@ public function withSkipCache(bool $skipCache): self return $this->with('skipCache', $skipCache); } + /** + * Whether to use the Cache as a failover for server errors + * + * @param bool $useCacheAsFailover + * + * @return self + */ + public function withUseCacheAsFailover(bool $useCacheAsFailover): self + { + return $this->with('useCacheAsFailover', $useCacheAsFailover); + } + /** * Get the environment model. * @return EnvironmentModel