TtlPlugin constructor
TtlPlugin({})
Creates a TTL plugin with configurable options.
writeEvents includes 'writeMeta' so stamp runs when storage layers
(e.g. hivehook) emit writeMeta for meta; the stamp returns updated payload
so the stored meta gets created_at.
Implementation
TtlPlugin({
this.metaKey = 'meta',
this.createdAtKey = 'created_at',
this.ttlSecondsKey = 'ttl_seconds',
this.readEvents = const ['read'],
this.writeEvents = const ['write', 'put', 'writeMeta'],
this.enableCleanup = true,
this.enableStamp = true,
this.nowProvider,
});