mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 20:34:03 +00:00
Toggle cache tags
This commit is contained in:
parent
5c6226befc
commit
87efdd2954
5 changed files with 17 additions and 5 deletions
|
|
@ -11,6 +11,8 @@ use Illuminate\Cache\Repository;
|
|||
|
||||
class CacheManager extends BaseCacheManager
|
||||
{
|
||||
public static bool $addTags = false;
|
||||
|
||||
/**
|
||||
* Add tags and forward the call to the inner cache store.
|
||||
*
|
||||
|
|
@ -19,8 +21,7 @@ class CacheManager extends BaseCacheManager
|
|||
*/
|
||||
public function __call($method, $parameters)
|
||||
{
|
||||
// todo0 Make PrefixCacheTenancyBootstrapper work with tags
|
||||
if (! tenancy()->initialized) {
|
||||
if (! tenancy()->initialized || ! static::$addTags) {
|
||||
return parent::__call($method, $parameters);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue