mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:14:04 +00:00
Use globalCache in CachedTenantResolver (fix #1340)
This commit is contained in:
parent
8f8af34c32
commit
3984d64cfa
2 changed files with 57 additions and 5 deletions
|
|
@ -4,8 +4,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy\Resolvers\Contracts;
|
||||
|
||||
use Illuminate\Contracts\Cache\Factory;
|
||||
use Illuminate\Contracts\Cache\Repository;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Stancl\Tenancy\Contracts\Tenant;
|
||||
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
||||
|
|
@ -13,12 +13,11 @@ use Stancl\Tenancy\Contracts\TenantResolver;
|
|||
|
||||
abstract class CachedTenantResolver implements TenantResolver
|
||||
{
|
||||
/** @var Repository */
|
||||
protected $cache;
|
||||
protected Repository $cache;
|
||||
|
||||
public function __construct(Factory $cache)
|
||||
public function __construct(Application $app)
|
||||
{
|
||||
$this->cache = $cache->store(static::cacheStore());
|
||||
$this->cache = $app->make('globalCache')->store(static::cacheStore());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue