updated packages
This commit is contained in:
@@ -22,9 +22,9 @@ class Cache extends AbstractCache
|
||||
protected $key;
|
||||
|
||||
/**
|
||||
* The cache expiration time in minutes.
|
||||
* The cache expiration time in seconds.
|
||||
*
|
||||
* @var int
|
||||
* @var int|null
|
||||
*/
|
||||
protected $expire;
|
||||
|
||||
@@ -38,11 +38,8 @@ class Cache extends AbstractCache
|
||||
public function __construct(Repository $repository, $key = 'flysystem', $expire = null)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->expire = $expire;
|
||||
$this->repository = $repository;
|
||||
|
||||
if (! is_null($expire)) {
|
||||
$this->expire = (int) ceil($expire / 60);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,10 +65,6 @@ class Cache extends AbstractCache
|
||||
{
|
||||
$contents = $this->getForStorage();
|
||||
|
||||
if (! is_null($this->expire)) {
|
||||
$this->repository->put($this->key, $contents, $this->expire);
|
||||
} else {
|
||||
$this->repository->forever($this->key, $contents);
|
||||
}
|
||||
$this->repository->put($this->key, $contents, $this->expire);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user