From e550c7dcdda58959f08a1a25a36452b8a46747eb Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Thu, 24 Nov 2022 11:57:14 +0500 Subject: [PATCH] Update PrefixCacheTenancyBootstrapper.php --- src/Bootstrappers/PrefixCacheTenancyBootstrapper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bootstrappers/PrefixCacheTenancyBootstrapper.php b/src/Bootstrappers/PrefixCacheTenancyBootstrapper.php index f3dd204a..29407706 100644 --- a/src/Bootstrappers/PrefixCacheTenancyBootstrapper.php +++ b/src/Bootstrappers/PrefixCacheTenancyBootstrapper.php @@ -41,12 +41,13 @@ class PrefixCacheTenancyBootstrapper implements TenancyBootstrapper $this->app['cache']->forgetDriver($this->storeName); // The CacheManager will have the $app['config'] array cached with old prefixes on the 'cache' instance + // This call will forget the 'cache' instance $this->app->forgetInstance('cache'); // The Cache Repository is using an old version of the CacheManager so we need to forget it $this->app->forgetInstance('cache.store'); - // Forget the cache repository in the container + // Forget the cache repository in the container to cover some edge-cases $this->app->forgetInstance(Repository::class); // It is needed when a call to the facade has been made before bootstrapping tenancy