CacheConfig

The configuration for the cache.

Members

debug :boolean

If true, logs cache hits, misses, and invalidations to the console.

Type:
  • boolean

debug :boolean

If true, logs cache hits, misses, and invalidations to the console.

Type:
  • boolean

defaultStrategy :CacheStrategy

The default caching strategy to use if none is specified in useCachedResource.

defaultStrategy :CacheStrategy

The default caching strategy to use if none is specified in cachedResource.

defaultTtl :number

Global default TTL (in milliseconds). Can be overridden per resource.

Type:
  • number

defaultTtl :number

Global default TTL (in milliseconds). Can be overridden per resource.

Type:
  • number

memory :object

Configuration specific to the memory cache.

Type:
  • object
Properties
NameTypeAttributesDescription
maxEntriesnumber<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.

memory :object

Configuration specific to the memory cache.

Type:
  • object
Properties
NameTypeAttributesDescription
maxEntriesnumber<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.

prefix :string

A unique namespace for keys. Needed when sharing LocalStorage with other apps on the same domain.

Type:
  • string

prefix :string

A unique namespace for keys. Needed when sharing LocalStorage with other apps on the same domain.

Type:
  • string

storage :object

Configuration specific to persistent storage (LocalStorage/IndexedDB).

Type:
  • object
Properties
NameTypeAttributesDescription
excludeSecureboolean<optional>

If true, sensitive data marked as 'secure' won't be written to , persistent storage, only memory.

storage :object

Configuration specific to persistent storage (LocalStorage/IndexedDB).

Type:
  • object
Properties
NameTypeAttributesDescription
excludeSecureboolean<optional>

If true, sensitive data marked as 'secure' won't be written to , persistent storage, only memory.

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.

Type:
  • number

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.

Type:
  • number

CacheConfig

The configuration for the cache.

Members

debug :boolean

If true, logs cache hits, misses, and invalidations to the console.

Type:
  • boolean

debug :boolean

If true, logs cache hits, misses, and invalidations to the console.

Type:
  • boolean

defaultStrategy :CacheStrategy

The default caching strategy to use if none is specified in useCachedResource.

defaultStrategy :CacheStrategy

The default caching strategy to use if none is specified in cachedResource.

defaultTtl :number

Global default TTL (in milliseconds). Can be overridden per resource.

Type:
  • number

defaultTtl :number

Global default TTL (in milliseconds). Can be overridden per resource.

Type:
  • number

memory :object

Configuration specific to the memory cache.

Type:
  • object
Properties
NameTypeAttributesDescription
maxEntriesnumber<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.

memory :object

Configuration specific to the memory cache.

Type:
  • object
Properties
NameTypeAttributesDescription
maxEntriesnumber<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.

prefix :string

A unique namespace for keys. Needed when sharing LocalStorage with other apps on the same domain.

Type:
  • string

prefix :string

A unique namespace for keys. Needed when sharing LocalStorage with other apps on the same domain.

Type:
  • string

storage :object

Configuration specific to persistent storage (LocalStorage/IndexedDB).

Type:
  • object
Properties
NameTypeAttributesDescription
excludeSecureboolean<optional>

If true, sensitive data marked as 'secure' won't be written to , persistent storage, only memory.

storage :object

Configuration specific to persistent storage (LocalStorage/IndexedDB).

Type:
  • object
Properties
NameTypeAttributesDescription
excludeSecureboolean<optional>

If true, sensitive data marked as 'secure' won't be written to , persistent storage, only memory.

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.

Type:
  • number

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.

Type:
  • number