Cloud
Distributed Cache
TTL cache with tag-based invalidation and tenant isolation.
Overview
The cloud cache provides an in-memory TTL cache with LRU eviction and tag-based invalidation. Keys can be prefixed by tenant ID for automatic data isolation.
Basic Usage
typescript
Custom TTL and Tags
typescript
Tenant Isolation
Prefix keys with the tenant ID to ensure data isolation:
typescript
Tag-Based Invalidation
Invalidate all cache entries matching a tag in one call:
typescript
Cache Maintenance
typescript
Custom Instance
typescript
Options
| Option | Type | Default | Description |
|---|---|---|---|
defaultTtlMs | number | 60000 | Default time-to-live in milliseconds |
maxEntries | number | 10000 | Maximum entries before LRU eviction |