Simple cache routine.

This commit is contained in:
James Cole 2017-07-30 13:44:36 +02:00
parent ef357ab6e5
commit 1caa393974
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -15,8 +15,6 @@ namespace FireflyIII\Support;
use Cache;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
use Illuminate\Support\Collection;
use Preferences as Prefs;
@ -97,25 +95,6 @@ class CacheProperties
{
$this->md5 = '';
foreach ($this->properties as $property) {
if ($property instanceof Collection || $property instanceof EloquentCollection) {
$this->md5 .= json_encode($property->toArray());
continue;
}
if ($property instanceof Carbon) {
$this->md5 .= $property->toRfc3339String();
continue;
}
if (is_object($property)) {
$this->md5 .= $property->__toString();
}
if (is_bool($property) && $property === false) {
$this->md5 .= 'false';
}
if (is_bool($property) && $property === true) {
$this->md5 .= 'true';
}
$this->md5 .= json_encode($property);
}
$this->md5 = md5($this->md5);