1 | <?php namespace Anomaly\Streams\Platform\View\Cache; |
||
15 | class CacheAdapter implements CacheProviderInterface |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * The cache repository. |
||
20 | * |
||
21 | * @var Repository |
||
22 | */ |
||
23 | protected $cache; |
||
24 | |||
25 | /** |
||
26 | * Create a new cache adapter. |
||
27 | * |
||
28 | * @param Repository $cache |
||
29 | */ |
||
30 | public function __construct(Repository $cache) |
||
34 | |||
35 | /** |
||
36 | * Get the cached value. |
||
37 | * |
||
38 | * @param string $key |
||
39 | * @return mixed |
||
40 | */ |
||
41 | public function fetch($key) |
||
45 | |||
46 | /** |
||
47 | * Put the cached value. |
||
48 | * |
||
49 | * @param string $key |
||
50 | * @param string $value |
||
51 | * @param int $lifetime |
||
52 | */ |
||
53 | public function save($key, $value, $lifetime = 0) |
||
57 | } |
||
58 |