cache
@rotorsoft/act-root / act/src / cache
Variable: cache
constcache: (adapter?) =>Cache
Defined in: libs/act/src/ports.ts:285
Gets or injects the singleton cache.
By default, Act uses an in-memory LRU cache. For distributed deployments, inject a Redis-backed cache before building your application.
Cache unifies snapshotting — snap() writes to cache instead of the event store,
and load() checks cache before querying the store for tail events.
Parameters
adapter?
Optional cache implementation to inject
Returns
The singleton cache instance