| 1 | <?php |
||
| 12 | abstract class CacheDecorator implements Cache |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * The decorated cache |
||
| 16 | * |
||
| 17 | * @var Cache |
||
| 18 | */ |
||
| 19 | private $cache; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * CacheDecorator constructor. |
||
| 23 | * |
||
| 24 | * @param Cache $cache |
||
| 25 | */ |
||
| 26 | public function __construct(Cache $cache) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * {@inheritdoc} |
||
| 33 | */ |
||
| 34 | public function set($key, $value, $timeToLive = 0) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | public function has($key) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | public function get($key, $default = null) |
||
| 54 | |||
| 55 | /** |
||
| 56 | * {@inheritdoc} |
||
| 57 | */ |
||
| 58 | public function demand($key) |
||
| 62 | |||
| 63 | /** |
||
| 64 | * {@inheritdoc} |
||
| 65 | */ |
||
| 66 | public function delete($key) |
||
| 70 | |||
| 71 | /** |
||
| 72 | * {@inheritdoc} |
||
| 73 | */ |
||
| 74 | public function flush() |
||
| 78 | } |
||
| 79 |