DetailGridCache
LRU cache for nested detail grid descriptors.
Methods
The following table outlines the methods for the DetailGridCache:
| Name | Parameters | Returns | Description |
|---|---|---|---|
| clear | - | void | Clear all cached entries, invoking destroy hooks before removal. |
| get | key : string | Retrieve a cached entry without creating a new one.
Refreshes the Params: | |
| getOrCreate | key : stringparentData : TDatanestingDepth : numberoptions : DetailGridOptions | Retrieve a cached entry or create a new one.
When reuse is enabled and a matching key exists, the existing entry is
returned and its Params: | |
| getStats | - | Object | Return a snapshot of cache statistics. Useful for diagnostics and tests. |
| has | key : string | boolean | Check whether a cache entry exists for the given key. Params: |
| registerDestroyHook | - | void | Register a destroy hook to invoke when an entry is released. Used to release external resources (e.g. timers, subscriptions) tied to the cached entry. Replaces any previously registered hook. |
| release | key : string | boolean | Release the entry for the given cache key, invoking any destroy hook before removing the entry from the cache. Params: |
| update | key : stringdata : unknown[]isLoading : booleanerror : string | null | void | Persist the latest data, loading, and error state for a cached entry. No-op when the key is unknown, ensuring that the cache never mutates state for entries that have already been evicted. Params: |
| buildCacheKey | parentData : unknownnestingDepth : numberoptions : DetailGridOptions | string | Build a stable cache key for a parent row. The key combines a parent identifier, nesting depth, and a configuration reference so that different option sets produce distinct entries. Params: |