Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.188.218.134
Current Path : /var/www/html/aws/Aws/ |
| Current File : /var/www/html/aws/Aws/PsrCacheAdapter.php |
<?php
namespace Aws;
use Psr\Cache\CacheItemPoolInterface;
class PsrCacheAdapter implements CacheInterface
{
/** @var CacheItemPoolInterface */
private $pool;
public function __construct(CacheItemPoolInterface $pool)
{
$this->pool = $pool;
}
public function get($key)
{
$item = $this->pool->getItem($key);
return $item->isHit() ? $item->get() : null;
}
public function set($key, $value, $ttl = 0)
{
$item = $this->pool->getItem($key);
$item->set($value);
if ($ttl > 0) {
$item->expiresAfter($ttl);
}
$this->pool->save($item);
}
public function remove($key)
{
$this->pool->deleteItem($key);
}
}
|