1
0
Fork 0
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:
lukinovec 2022-12-13 05:25:57 +01:00
parent 5c6226befc
commit 87efdd2954
5 changed files with 17 additions and 5 deletions

View file

@ -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);
}