NiceViewCache class

Cache for view definitions with TTL and ETag support.

Constructors

NiceViewCache({required NiceViewCacheStorage storage, Duration ttl = const Duration(hours: 1)})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage NiceViewCacheStorage
final
ttl Duration
final

Methods

cachedViewIds() Future<List<String>>
Get all cached view IDs.
clear() Future<void>
Clear all cached views.
get(String viewId) Future<NiceViewDefinition?>
Get a cached definition; returns null if missing or expired.
getETag(String viewId) Future<String?>
Get the cached ETag for a view (for delta updates).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(NiceViewDefinition definition, {String? etag}) Future<void>
Store a definition in cache.
remove(String viewId) Future<void>
Remove a specific view from cache.
toString() String
A string representation of this object.
inherited

Operators

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