mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:34:04 +00:00
Make null falsey for cache config because config is not merged recursively
This commit is contained in:
parent
f6115d590a
commit
776af4643c
3 changed files with 3 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ return [
|
|||
'tenants' => 'tenants',
|
||||
'domains' => 'domains',
|
||||
],
|
||||
'cache_store' => false, // What store should be used to cache tenant resolution. Set to false to disable cache, null to use default store, or a string with a specific cache store name.
|
||||
'cache_store' => null, // What store should be used to cache tenant resolution. Set to null to disable cache or a string with a specific cache store name.
|
||||
'cache_ttl' => 3600, // seconds
|
||||
],
|
||||
'redis' => [
|
||||
|
|
|
|||
|
|
@ -251,7 +251,6 @@ class DatabaseStorageDriver implements StorageDriver, CanDeleteKeys, CanFindByAn
|
|||
|
||||
public function usesCache(): bool
|
||||
{
|
||||
// null is also truthy here
|
||||
return $this->app['config']['tenancy.storage_drivers.db.cache_store'] !== false;
|
||||
return $this->app['config']['tenancy.storage_drivers.db.cache_store'] !== null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class CachedResolverTest extends TestCase
|
|||
$this->markTestSkipped('This test is only relevant for the DB storage driver.');
|
||||
}
|
||||
|
||||
config(['tenancy.storage_drivers.db.cache_store' => null]); // default driver
|
||||
config(['tenancy.storage_drivers.db.cache_store' => config('cache.default')]);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue