Class: LocalCache
An extension of the abstract Cache
interface which implements all required functionality locally (i.e. within the process's memory).
Hierarchy
↳ LocalCache
Index
Properties
Methods
Properties
Private
dependents
• dependents: Relation‹string, string› = new Relation()
Defined in lib/cache/LocalCache.ts:15
Maps paths to queries. Whenever a path is invalidated
, its associated queries will be recalculated
.
Private
states
• states: Map‹string, State› = new Map()
Defined in lib/cache/LocalCache.ts:12
Maps queries to the states
produced by invoking their associated operations
.
Methods
getQueries
▸ getQueries(paths
: string | Array‹string›): Promise‹string[]›
Overrides Cache.getQueries
Defined in lib/cache/LocalCache.ts:41
Parameters:
Name | Type |
---|---|
paths |
string | Array‹string› |
Returns: Promise‹string[]›
getState
▸ getState(query
: string): Promise‹State‹››
Defined in lib/cache/LocalCache.ts:37
Parameters:
Name | Type |
---|---|
query |
string |
Returns: Promise‹State‹››
setState
▸ setState(state
: State): Promise‹boolean›
Defined in lib/cache/LocalCache.ts:17
Parameters:
Name | Type |
---|---|
state |
State |
Returns: Promise‹boolean›
unset
▸ unset(query
: string): Promise‹boolean›
Defined in lib/cache/LocalCache.ts:30
Parameters:
Name | Type |
---|---|
query |
string |
Returns: Promise‹boolean›