@egain/ai-agent-sdk API Reference - v0.1.1 / CacheConfig
Interface: CacheConfig
Cache configuration options
Table of contents
Properties
Properties
enabled
• Optional enabled: boolean
Whether caching is enabled
Default
ts
trueDefined in
storageType
• Optional storageType: CacheStorageType
Storage type: 'local' (localStorage), 'session' (sessionStorage), or 'memory'
Default
ts
'session'Defined in
keyPrefix
• Optional keyPrefix: string
Prefix for cache keys
Default
ts
'egain_aiagent_cache_'Defined in
ttl
• Optional ttl: number
Time-to-live in milliseconds
Default
ts
300000 (5 minutes)Defined in
adapter
• Optional adapter: CacheAdapter
Custom cache adapter instance When provided, this adapter will be used instead of the built-in adapters. The SDK manages all caching logic (TTL, keys, invalidation) - the adapter only provides the underlying storage mechanism with synchronous get/set.