1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-15 20:34:04 +00:00

Disable cache tagging by default, add CacheTagBootstrapper

This commit is contained in:
lukinovec 2023-04-11 14:28:28 +02:00
parent 5849afa4c8
commit 7ebfc375d6
5 changed files with 31 additions and 12 deletions

View file

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Bootstrappers;
use Stancl\Tenancy\CacheManager;
use Stancl\Tenancy\Contracts\Tenant;
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
class CacheTagBootstrapper implements TenancyBootstrapper
{
public function bootstrap(Tenant $tenant): void
{
CacheManager::$addTags = true;
}
public function revert(): void
{
CacheManager::$addTags = false;
}
}