diff --git a/app/Services/SettingService.php b/app/Services/SettingService.php index 18a7c0d1b..ce87f5a4b 100644 --- a/app/Services/SettingService.php +++ b/app/Services/SettingService.php @@ -98,6 +98,9 @@ class SettingService { $cacheKey = $this->cachePrefix . $key; $this->cache->forget($cacheKey); + if (isset($this->localCache[$key])) { + unset($this->localCache[$key]); + } } /** diff --git a/tests/Entity/EntityTest.php b/tests/Entity/EntityTest.php index 549253417..4d4e0e6cd 100644 --- a/tests/Entity/EntityTest.php +++ b/tests/Entity/EntityTest.php @@ -90,14 +90,14 @@ class EntityTest extends BrowserKitTest $this->actingAs($editor) ->visit('/books') ->pageHasElement('.featured-image-container') - ->submitForm('Toggle Book View') + ->submitForm('List View') // Check redirection. ->seePageIs('/books') ->pageNotHasElement('.featured-image-container'); $this->actingAs($editor) ->visit('/books') - ->submitForm('Toggle Book View') + ->submitForm('Grid View') ->seePageIs('/books') ->pageHasElement('.featured-image-container');