| Server IP : 157.230.181.24 / Your IP : 216.73.217.11 Web Server : Apache/2.4.58 (Ubuntu) System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/vhosts/conductivemarketing/vendor/illuminate/filesystem/ |
Upload File : |
<?php
namespace Illuminate\Filesystem;
use Illuminate\Contracts\Cache\Repository;
use League\Flysystem\Cached\Storage\AbstractCache;
class Cache extends AbstractCache
{
/**
* The cache repository implementation.
*
* @var \Illuminate\Contracts\Cache\Repository
*/
protected $repository;
/**
* The cache key.
*
* @var string
*/
protected $key;
/**
* The cache expiration time in minutes.
*
* @var int
*/
protected $expire;
/**
* Create a new cache instance.
*
* @param \Illuminate\Contracts\Cache\Repository $repository
* @param string $key
* @param int|null $expire
*/
public function __construct(Repository $repository, $key = 'flysystem', $expire = null)
{
$this->key = $key;
$this->repository = $repository;
if (! is_null($expire)) {
$this->expire = (int) ceil($expire / 60);
}
}
/**
* Load the cache.
*
* @return void
*/
public function load()
{
$contents = $this->repository->get($this->key);
if (! is_null($contents)) {
$this->setFromStorage($contents);
}
}
/**
* Persist the cache.
*
* @return void
*/
public function save()
{
$contents = $this->getForStorage();
if (! is_null($this->expire)) {
$this->repository->put($this->key, $contents, $this->expire);
} else {
$this->repository->forever($this->key, $contents);
}
}
}