mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Auto commit for release 'branch-v6.2' on 2024-12-22
This commit is contained in:
@@ -23,9 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support;
|
||||
|
||||
use Cache;
|
||||
use Illuminate\Support\Collection;
|
||||
use JsonException;
|
||||
|
||||
/**
|
||||
* Class CacheProperties.
|
||||
@@ -57,7 +55,7 @@ class CacheProperties
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
return Cache::get($this->hash);
|
||||
return \Cache::get($this->hash);
|
||||
}
|
||||
|
||||
public function getHash(): string
|
||||
@@ -72,16 +70,16 @@ class CacheProperties
|
||||
}
|
||||
$this->hash();
|
||||
|
||||
return Cache::has($this->hash);
|
||||
return \Cache::has($this->hash);
|
||||
}
|
||||
|
||||
private function hash(): void
|
||||
{
|
||||
$content = '';
|
||||
$content = '';
|
||||
foreach ($this->properties as $property) {
|
||||
try {
|
||||
$content .= json_encode($property, JSON_THROW_ON_ERROR);
|
||||
} catch (JsonException $e) {
|
||||
} catch (\JsonException $e) {
|
||||
// @ignoreException
|
||||
$content .= hash('sha256', (string) time());
|
||||
}
|
||||
@@ -94,6 +92,6 @@ class CacheProperties
|
||||
*/
|
||||
public function store($data): void
|
||||
{
|
||||
Cache::forever($this->hash, $data);
|
||||
\Cache::forever($this->hash, $data);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user