The configuration for the cache.
- Source
Members
debug :boolean
If true, logs cache hits, misses, and invalidations to the console.
- boolean
- Source
debug :boolean
If true, logs cache hits, misses, and invalidations to the console.
- boolean
- Source
defaultStrategy :CacheStrategy
The default caching strategy to use if none is specified in useCachedResource.
- Source
defaultStrategy :CacheStrategy
The default caching strategy to use if none is specified in cachedResource.
- Source
defaultTtl :number
Global default TTL (in milliseconds). Can be overridden per resource.
- number
- Source
defaultTtl :number
Global default TTL (in milliseconds). Can be overridden per resource.
- number
- Source
memory :object
Configuration specific to the memory cache.
- object
| Name | Type | Attributes | Description |
|---|---|---|---|
maxEntries | number | <optional> | The maximum number of items to keep in memory., Implements an LRU (Least Recently Used) eviction policy , to prevent memory leaks in large Single Page Apps. |
- Source
memory :object
Configuration specific to the memory cache.
- object
| Name | Type | Attributes | Description |
|---|---|---|---|
maxEntries | number | <optional> | The maximum number of items to keep in memory., Implements an LRU (Least Recently Used) eviction policy , to prevent memory leaks in large Single Page Apps. |
- Source
prefix :string
A unique namespace for keys. Needed when sharing LocalStorage with other apps on the same domain.
- string
- Source
prefix :string
A unique namespace for keys. Needed when sharing LocalStorage with other apps on the same domain.
- string
- Source
storage :object
Configuration specific to persistent storage (LocalStorage/IndexedDB).
- object
| Name | Type | Attributes | Description |
|---|---|---|---|
excludeSecure | boolean | <optional> | If true, sensitive data marked as 'secure' won't be written to , persistent storage, only memory. |
- Source
storage :object
Configuration specific to persistent storage (LocalStorage/IndexedDB).
- object
| Name | Type | Attributes | Description |
|---|---|---|---|
excludeSecure | boolean | <optional> | If true, sensitive data marked as 'secure' won't be written to , persistent storage, only memory. |
- Source
version :number
A global version number. If this changes (e.g., from 1 to 2), the cache will automatically flush all persistent state to prevent schema mismatching.
- number
- Source
version :number
A global version number. If this changes (e.g., from 1 to 2), the cache will automatically flush all persistent state to prevent schema mismatching.
- number
- Source