| 1 |
<?php |
| 2 |
|
| 3 |
namespace Dudlewebs\WPMCS\s3\Aws; |
| 4 |
|
| 5 |
use Dudlewebs\WPMCS\s3\Psr\SimpleCache\CacheInterface as SimpleCacheInterface; |
| 6 |
class Psr16CacheAdapter implements CacheInterface |
| 7 |
{ |
| 8 |
/** @var SimpleCacheInterface */ |
| 9 |
private $cache; |
| 10 |
public function __construct(SimpleCacheInterface $cache) |
| 11 |
{ |
| 12 |
$this->cache = $cache; |
| 13 |
} |
| 14 |
public function get($key) |
| 15 |
{ |
| 16 |
return $this->cache->get($key); |
| 17 |
} |
| 18 |
public function set($key, $value, $ttl = 0) |
| 19 |
{ |
| 20 |
$this->cache->set($key, $value, $ttl); |
| 21 |
} |
| 22 |
public function remove($key) |
| 23 |
{ |
| 24 |
$this->cache->delete($key); |
| 25 |
} |
| 26 |
} |
| 27 |
|