Sf4 /
Api
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Created by PhpStorm. |
||
| 4 | * User: siim |
||
| 5 | * Date: 5.03.19 |
||
| 6 | * Time: 9:28 |
||
| 7 | */ |
||
| 8 | |||
| 9 | namespace Sf4\Api\RequestHandler\Traits; |
||
| 10 | |||
| 11 | use Sf4\Api\Services\CacheAdapterInterface; |
||
| 12 | |||
| 13 | interface CacheAdapterTraitInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @return CacheAdapterInterface |
||
| 17 | */ |
||
| 18 | public function getCacheAdapter(): CacheAdapterInterface; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param CacheAdapterInterface $cacheAdapter |
||
| 22 | */ |
||
| 23 | public function setCacheAdapter(CacheAdapterInterface $cacheAdapter): void; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $cacheKey |
||
| 27 | * @param \Closure $closure |
||
| 28 | * @param array $tags |
||
| 29 | * @param null $expiresAfter |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 30 | * @return mixed|null |
||
| 31 | * @throws \Psr\Cache\CacheException |
||
| 32 | * @throws \Psr\Cache\InvalidArgumentException |
||
| 33 | */ |
||
| 34 | public function getCacheDataOrAdd(string $cacheKey, \Closure $closure, array $tags = [], $expiresAfter = null); |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $cacheKey |
||
| 38 | * @throws \Psr\Cache\InvalidArgumentException |
||
| 39 | */ |
||
| 40 | public function removeByKey(string $cacheKey); |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param array $tags |
||
| 44 | */ |
||
| 45 | public function removeByTag(array $tags); |
||
| 46 | } |
||
| 47 |