generated from Nodarx/template
feat: implement content cache
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -105,6 +105,7 @@ class EntityResource extends EntityMutableAbstract {
|
||||
return [
|
||||
'schemaVersion' => self::CACHE_SCHEMA_VERSION,
|
||||
'created' => $this->data['created'] ?? null,
|
||||
'incomplete' => $this->getProperties()->getIncompleteSections(),
|
||||
'properties' => $this->getProperties()->toCacheContent(),
|
||||
];
|
||||
}
|
||||
@@ -124,7 +125,9 @@ class EntityResource extends EntityMutableAbstract {
|
||||
$this->data['created'] = $content['created'];
|
||||
}
|
||||
|
||||
$this->getProperties()->fromCacheContent($content['properties'] ?? []);
|
||||
$this->getProperties()
|
||||
->fromCacheContent($content['properties'] ?? [])
|
||||
->setIncompleteSections(...array_map('strval', $content['incomplete'] ?? []));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user