| 1 | <?php | ||
| 12 | class Cache extends AbstractCache | ||
| 13 | { | ||
| 14 | /** | ||
| 15 | * The cache repository implementation. | ||
| 16 | * | ||
| 17 | * @var \Psr\SimpleCache\CacheInterface | ||
| 18 | */ | ||
| 19 | protected $repository; | ||
| 20 | |||
| 21 | /** | ||
| 22 | * The cache key. | ||
| 23 | * | ||
| 24 | * @var string | ||
| 25 | */ | ||
| 26 | protected $key; | ||
| 27 | |||
| 28 | /** | ||
| 29 | * The cache expiration time in seconds. | ||
| 30 | * | ||
| 31 | * @var int|null | ||
| 32 | */ | ||
| 33 | protected $expire; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * Create a new cache instance. | ||
| 37 | * | ||
| 38 | * @param \Psr\SimpleCache\CacheInterface $repository | ||
| 39 | * @param string $key | ||
| 40 | * @param int|null $expire | ||
| 41 | * @return void | ||
|  | |||
| 42 | */ | ||
| 43 | public function __construct(CacheInterface $repository, $key = 'flysystem', $expire = null) | ||
| 49 | |||
| 50 | /** | ||
| 51 | * Load the cache. | ||
| 52 | * | ||
| 53 | * @return void | ||
| 54 | */ | ||
| 55 | public function load() | ||
| 63 | |||
| 64 | /** | ||
| 65 | * Persist the cache. | ||
| 66 | * | ||
| 67 | * @return void | ||
| 68 | */ | ||
| 69 | public function save() | ||
| 75 | } | 
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.