| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 92.31% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class CacheStore extends AbstractCache |
||
|
1 ignored issue
–
show
|
|||
| 19 | { |
||
| 20 | protected $store; |
||
| 21 | |||
| 22 | protected $key; |
||
| 23 | |||
| 24 | protected $expire; |
||
| 25 | |||
| 26 | 1 | public function __construct(CacheInterface $store, $key = 'flysystem', $expire = null) |
|
| 27 | { |
||
| 28 | 1 | $this->key = $key; |
|
| 29 | 1 | $this->store = $store; |
|
| 30 | 1 | $this->expire = $expire; |
|
| 31 | 1 | } |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Store the cache. |
||
| 35 | */ |
||
| 36 | 1 | public function save() |
|
| 37 | { |
||
| 38 | 1 | $contents = $this->getForStorage(); |
|
| 39 | |||
| 40 | 1 | $this->store->set($this->key, $contents, $this->expire); |
|
| 41 | 1 | } |
|
| 42 | |||
| 43 | /** |
||
| 44 | * Load the cache. |
||
| 45 | */ |
||
| 46 | 1 | public function load() |
|
| 52 | } |
||
| 53 | 1 | } |
|
| 54 | } |
||
| 55 |