feat(cache): add persistent smartdata-backed cache with LocalTsmDb, cache cleaner, and DcRouter integration

This commit is contained in:
2026-02-10 11:22:15 +00:00
parent f3f1f58b67
commit 41fe7a8a47
15 changed files with 282 additions and 39 deletions

View File

@@ -15,6 +15,16 @@ const getDb = () => CacheDb.getInstance().getDb();
*/
@plugins.smartdata.Collection(() => getDb())
export class CachedDKIMKey extends CachedDocument<CachedDKIMKey> {
// TTL fields from base class (decorators required on concrete class)
@plugins.smartdata.svDb()
public createdAt: Date = new Date();
@plugins.smartdata.svDb()
public expiresAt: Date = new Date(Date.now() + TTL.DAYS_90);
@plugins.smartdata.svDb()
public lastAccessedAt: Date = new Date();
/**
* Composite key: domain:selector
*/