Skip to content

Class: AppKitCacheStorage

Memory-first AppKit CacheStorage backed by @dbx-tools/cache.

  • CacheStorage

new AppKitCacheStorage(cache, persistent): AppKitCacheStorage

Cacheable

CacheStorage | undefined

AppKitCacheStorage

cleanupExpired(): Promise<number>

Forward AppKit’s runtime-only persistent cleanup hook when available.

Promise<number>


clear(): Promise<void>

Clear the storage

Promise<void>

CacheStorage.clear


close(): Promise<void>

Close the storage

Promise<void>

CacheStorage.close


delete(key): Promise<void>

Delete a value from the storage

string

Promise<void>

CacheStorage.delete


flush(): Promise<void>

Drain tracked write-behind persistence without closing the storage.

Promise<void>


get<T>(key): Promise<CacheEntry<T> | null>

Get a cached value from the storage

T

string

Promise<CacheEntry<T> | null>

CacheStorage.get


has(key): Promise<boolean>

Check if a value exists in the storage

string

Promise<boolean>

CacheStorage.has


healthCheck(): Promise<boolean>

Check if the storage is healthy

Promise<boolean>

CacheStorage.healthCheck


isPersistent(): boolean

Check if the storage is persistent

boolean

CacheStorage.isPersistent


set<T>(key, entry): Promise<void>

Set a value in the storage

T

string

CacheEntry<T>

Promise<void>

CacheStorage.set


size(): Promise<number>

Get the size of the storage

Promise<number>

CacheStorage.size