| 1 | <?php |
||
| 11 | class SimpleCache implements Cache { |
||
| 12 | |||
| 13 | /** @var int */ |
||
| 14 | protected $_minutes; |
||
| 15 | /** @var string */ |
||
| 16 | private $_key; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * SimpleCache constructor. |
||
| 20 | * @param int $minutes For how long should the data be cached? |
||
| 21 | */ |
||
| 22 | 1 | public function __construct(int $minutes = 60) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @param \Closure $dataFunction |
||
| 30 | * @return Collection |
||
| 31 | */ |
||
| 32 | public function retrieve(\Closure $dataFunction) : Collection |
||
| 38 | } |