mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 03:34:04 +00:00
cache prefix base from config
This commit is contained in:
parent
90c54ac733
commit
e5658fa300
2 changed files with 2 additions and 1 deletions
|
|
@ -188,6 +188,7 @@ return [
|
|||
*/
|
||||
'cache' => [
|
||||
'tag_base' => 'tenant', // This tag_base, followed by the tenant_id, will form a tag that will be applied on each cache call.
|
||||
'prefix_base' => 'tenant_' // this prefix_base, followed by the tenant_id, will form a cache prefix that will be applied on each cache call
|
||||
],
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class PrefixCacheTenancyBootstrapper implements TenancyBootstrapper
|
|||
$this->originalPrefix = $this->app['config']['cache.prefix'];
|
||||
$this->storeName = $this->app['config']['cache.default'];
|
||||
|
||||
$this->setCachePrefix('tenant_id_' . $tenant->id);
|
||||
$this->setCachePrefix($this->app['config']['tenancy.cache.prefix_base'] . $tenant->id);
|
||||
}
|
||||
|
||||
public function revert(): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue