Skip to content

CacheOptions

@blobs/sdk v0.1.0


@blobs/sdk / cache / CacheOptions

Defined in: cache/CacheProvider.ts:78

Construction options shared by all built-in cache providers.

Properties

defaultTTL?

optional defaultTTL?: number

Defined in: cache/CacheProvider.ts:83

Default TTL applied when a set() call omits its own TTL, in milliseconds. 0 means entries never expire automatically.


prefix?

optional prefix?: string

Defined in: cache/CacheProvider.ts:89

Optional key prefix used to namespace the provider’s storage. Most useful for LocalStorageCache when sharing localStorage.


debug?

optional debug?: boolean

Defined in: cache/CacheProvider.ts:94

When true, the provider logs hits, misses, and writes via console.log.