feat(cache): add persistent smartdata-backed cache with LocalTsmDb, cache cleaner, and DcRouter integration
This commit is contained in:
10
ts/cache/documents/classes.cached.dkim.ts
vendored
10
ts/cache/documents/classes.cached.dkim.ts
vendored
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user