Skip to content

@arcmantle/chronicle / proxy-cache

proxy-cache

Functions

clear()

clear(root): void

Defined in: proxy-cache.ts:82

Clear all cached proxies for the given root.

Parameters

root

object

The root object

Returns

void


getCached()

getCached(root, pathKey): any

Defined in: proxy-cache.ts:19

Get a cached proxy for the given root and path.

Parameters

root

object

The root object

pathKey

string

The path key (from pathKeyOf)

Returns

any

The cached proxy, or undefined if not cached


invalidateAt()

invalidateAt(root, basePath, alsoParentArray?): void

Defined in: proxy-cache.ts:52

Invalidate cached proxies at and below the given base path. Optionally also invalidates the parent path (for array shrinkage).

Parameters

root

object

The root object

basePath

string[]

The base path to invalidate

alsoParentArray?

boolean

Whether to also invalidate the parent path

Returns

void


setCached()

setCached(root, pathKey, proxy): void

Defined in: proxy-cache.ts:33

Store a proxy in the cache for the given root and path.

Parameters

root

object

The root object

pathKey

string

The path key (from pathKeyOf)

proxy

any

The proxy to cache

Returns

void

Released under the Apache-2.0 License.