mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-17 13:38:01 +00:00
S3/Minio storage controller Support
This commit is contained in:
30
storage-controllers/s3/Aws/Psr16CacheAdapter.php
Normal file
30
storage-controllers/s3/Aws/Psr16CacheAdapter.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace Aws;
|
||||
|
||||
use Psr\SimpleCache\CacheInterface as SimpleCacheInterface;
|
||||
|
||||
class Psr16CacheAdapter implements CacheInterface
|
||||
{
|
||||
/** @var SimpleCacheInterface */
|
||||
private $cache;
|
||||
|
||||
public function __construct(SimpleCacheInterface $cache)
|
||||
{
|
||||
$this->cache = $cache;
|
||||
}
|
||||
|
||||
public function get($key)
|
||||
{
|
||||
return $this->cache->get($key);
|
||||
}
|
||||
|
||||
public function set($key, $value, $ttl = 0)
|
||||
{
|
||||
$this->cache->set($key, $value, $ttl);
|
||||
}
|
||||
|
||||
public function remove($key)
|
||||
{
|
||||
$this->cache->delete($key);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user