Cache
@rotorsoft/act-root / act/src / Cache
Interface: Cache
Defined in: libs/act/src/types/ports.ts:38
Cache port for storing stream snapshots in-process.
Implementations should provide fast key-value access with bounded memory. The async interface is forward-compatible with external caches (e.g., Redis).
Template
The state schema type
Extends
Properties
dispose
dispose:
Disposer
Defined in: libs/act/src/types/ports.ts:59
Inherited from
Disposable.dispose
Methods
clear()
clear():
Promise<void>
Defined in: libs/act/src/types/ports.ts:47
Returns
Promise<void>
get()
get<
TState>(stream):Promise<CacheEntry<TState> |undefined>
Defined in: libs/act/src/types/ports.ts:39
Type Parameters
TState
TState extends Schema
Parameters
stream
string
Returns
Promise<CacheEntry<TState> | undefined>
invalidate()
invalidate(
stream):Promise<void>
Defined in: libs/act/src/types/ports.ts:46
Parameters
stream
string
Returns
Promise<void>
set()
set<
TState>(stream,entry):Promise<void>
Defined in: libs/act/src/types/ports.ts:42
Type Parameters
TState
TState extends Schema
Parameters
stream
string
entry
CacheEntry<TState>
Returns
Promise<void>