Skip to content

@nogoo9/mcp-server-cloud-fs / cache/redis / RedisStore

Class: RedisStore

Defined in: cache/redis.ts:26

Redis-backed cache store using ioredis.

Uses Redis SETEX for TTL-based storage with debounced write-back. Requires ioredis as an optional peer dependency — use createRedisStore to construct with automatic dependency checking.

Implements

Constructors

Constructor

new RedisStore(provider, client, opts): RedisStore

Defined in: cache/redis.ts:30

Parameters

provider

StorageProvider

client

RedisClient

opts
syncDebounceMs

number

ttlMs

number

Returns

RedisStore

Methods

clear()

clear(): Promise<void>

Defined in: cache/redis.ts:63

Returns

Promise<void>

Implementation of

CacheStore.clear


delete()

delete(cacheKey): Promise<void>

Defined in: cache/redis.ts:58

Parameters

cacheKey

string

Returns

Promise<void>

Implementation of

CacheStore.delete


dirtyEntries()

dirtyEntries(): string[]

Defined in: cache/redis.ts:54

Returns

string[]

Implementation of

CacheStore.dirtyEntries


flush()

flush(): Promise<void>

Defined in: cache/redis.ts:71

Cancels debounce timer; flushes all dirty entries to provider synchronously.

Returns

Promise<void>

Implementation of

CacheStore.flush


get()

get(cacheKey): Promise<Buffer<ArrayBufferLike> | null>

Defined in: cache/redis.ts:36

Returns null on cache miss or TTL expiry. Does NOT call the provider.

Parameters

cacheKey

string

Returns

Promise<Buffer<ArrayBufferLike> | null>

Implementation of

CacheStore.get


isDirty()

isDirty(cacheKey): boolean

Defined in: cache/redis.ts:50

Parameters

cacheKey

string

Returns

boolean

Implementation of

CacheStore.isDirty


markDirty()

markDirty(cacheKey, root, key): void

Defined in: cache/redis.ts:45

Marks cacheKey dirty and records routing info for flush. Starts debounce timer.

Parameters

cacheKey

string

root

ParsedRoot

key

string

Returns

void

Implementation of

CacheStore.markDirty


set()

set(cacheKey, value): Promise<void>

Defined in: cache/redis.ts:40

Stores value with TTL; does NOT mark dirty.

Parameters

cacheKey

string

value

Buffer

Returns

Promise<void>

Implementation of

CacheStore.set

Released under the PolyForm Shield 1.0.0 License.