| Server IP : 34.87.99.72 / Your IP : 216.73.217.31 Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 User : bitnami ( 1000) PHP Version : 7.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/apache/htdocs/app/vendor/league/flysystem-cached-adapter/src/Storage/ |
Upload File : |
<?php
namespace League\Flysystem\Cached\Storage;
use Stash\Pool;
class Stash extends AbstractCache
{
/**
* @var string storage key
*/
protected $key;
/**
* @var int|null seconds until cache expiration
*/
protected $expire;
/**
* @var \Stash\Pool Stash pool instance
*/
protected $pool;
/**
* Constructor.
*
* @param \Stash\Pool $pool
* @param string $key storage key
* @param int|null $expire seconds until cache expiration
*/
public function __construct(Pool $pool, $key = 'flysystem', $expire = null)
{
$this->key = $key;
$this->expire = $expire;
$this->pool = $pool;
}
/**
* {@inheritdoc}
*/
public function load()
{
$item = $this->pool->getItem($this->key);
$contents = $item->get();
if ($item->isMiss() === false) {
$this->setFromStorage($contents);
}
}
/**
* {@inheritdoc}
*/
public function save()
{
$contents = $this->getForStorage();
$item = $this->pool->getItem($this->key);
$item->set($contents, $this->expire);
}
}