Skip to content

Commit b292091

Browse files
author
Andrey Helldar
authored
Merge pull request #11 from TheDragonCode/2.x
Removed the `CacheManager` facade
2 parents 4a6e27a + 5d9fe5e commit b292091

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed

src/Facades/Support/CacheManager.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/Services/Cache.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
namespace DragonCode\Cache\Services;
66

77
use DragonCode\Cache\Concerns\Call;
8-
use DragonCode\Cache\Facades\Support\CacheManager;
98
use DragonCode\Cache\Facades\Support\Key;
109
use DragonCode\Cache\Facades\Support\Tag;
11-
use DragonCode\Cache\Support\CacheManager as Manager;
10+
use DragonCode\Cache\Support\CacheManager;
1211
use DragonCode\Support\Concerns\Makeable;
1312

1413
/**
@@ -94,8 +93,8 @@ public function has(): bool
9493
return false;
9594
}
9695

97-
protected function manager(): Manager
96+
protected function manager(): CacheManager
9897
{
99-
return CacheManager::tags($this->tags);
98+
return CacheManager::make()->tags($this->tags);
10099
}
101100
}

src/Support/CacheManager.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77
use DragonCode\Cache\Services\Storages\MainStore;
88
use DragonCode\Cache\Services\Storages\TaggedStore;
99
use DragonCode\Contracts\Cache\Store;
10+
use DragonCode\Support\Concerns\Makeable;
1011
use Illuminate\Support\Facades\Cache;
1112

13+
/**
14+
* @method static CacheManager make()
15+
*/
1216
class CacheManager implements Store
1317
{
18+
use Makeable;
19+
1420
protected $tags = [];
1521

1622
public function tags(array $tags): CacheManager

0 commit comments

Comments
 (0)