DVCacheRuntime class abstract final

The cache's machinery, for the framework and its tests.

Exported from package:dartvel_core/framework.dart and not from the barrel an application imports. An application reads and writes DV.Cache, names its store in dartvel.cache and switches store with DVCache.withAdapter; the generated server calls configure, the scheduler and the CLI reach the store, and the Studio's cache explorer reads tags and keysForTag.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

adapter → DVCacheAdapter
The store currently behind DV.Cache.
no setter
global → DVCacheView
The backend/shared cache, with the same four calls as DV.Cache. Each call throws a StateError until configureGlobal has given it a store.
no setter
tags → Set<String>
Every tag that currently has keys under it.
no setter

Static Methods

configure(DVCacheAdapter adapter) → void
Swaps the store behind DV.Cache. The generated server calls this at startup with the store dartvel.cache names.
configureGlobal(DVCacheAdapter? adapter) → void
Sets, or with null removes, the backend/shared cache global uses.
keysForTag(String tag) → Set<String>
The keys currently tagged tag, as stored: tenant-scoped.
lock<T>(String key, FutureOr<T> body(), {Duration ttl = const Duration(seconds: 30), Duration? wait}) → Future<T?>
Runs body while holding the lock named key, and releases it afterwards whether body returns or throws.
purgeExpired() → Future<int>
Removes entries whose TTL has elapsed, reclaiming storage. Reads already ignore expired entries, so this is housekeeping rather than correctness.