| 1 |
<?php |
| 2 |
|
| 3 |
namespace Dudlewebs\WPMCS\s3\Aws; |
| 4 |
|
| 5 |
/** |
| 6 |
* Represents a simple cache interface. |
| 7 |
*/ |
| 8 |
interface CacheInterface |
| 9 |
{ |
| 10 |
/** |
| 11 |
* Get a cache item by key. |
| 12 |
* |
| 13 |
* @param string $key Key to retrieve. |
| 14 |
* |
| 15 |
* @return mixed|null Returns the value or null if not found. |
| 16 |
*/ |
| 17 |
public function get($key); |
| 18 |
/** |
| 19 |
* Set a cache key value. |
| 20 |
* |
| 21 |
* @param string $key Key to set |
| 22 |
* @param mixed $value Value to set. |
| 23 |
* @param int $ttl Number of seconds the item is allowed to live. Set |
| 24 |
* to 0 to allow an unlimited lifetime. |
| 25 |
*/ |
| 26 |
public function set($key, $value, $ttl = 0); |
| 27 |
/** |
| 28 |
* Remove a cache key. |
| 29 |
* |
| 30 |
* @param string $key Key to remove. |
| 31 |
*/ |
| 32 |
public function remove($key); |
| 33 |
} |
| 34 |
|