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