feat: implement meta and content cache

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-09-29 19:45:00 -04:00
parent e5e76351a5
commit d28800a04e
8 changed files with 715 additions and 22 deletions
+5 -5
View File
@@ -16,8 +16,8 @@ use KTXF\Mail\Collection\CollectionRoles;
/**
* IMAP Mail Collection Properties
*
* Backed by the same internal $data shape as the JMAP provider so that cache
* documents are interchangeable with fromStore() / toStore().
* Backed by the same internal $data shape as the JMAP provider so that
* cache documents are interchangeable with fromCacheMeta() / toCacheMeta().
*/
class CollectionProperties extends CollectionPropertiesMutableAbstract
{
@@ -50,14 +50,14 @@ class CollectionProperties extends CollectionPropertiesMutableAbstract
return $this;
}
// ── Store (MongoDB cache) ────────────────────────────────────────────────
// ── Cache (meta store) ───────────────────────────────────────────────────
public function toStore(): array
public function toCacheMeta(): array
{
return $this->data;
}
public function fromStore(array $data): static
public function fromCacheMeta(array $data): static
{
$this->data = $data;
return $this;