Skip to content

@nogoo9/mcp-server-cloud-fs / PassThroughCache

Class: PassThroughCache

Defined in: cache/passthrough.ts:15

No-op cache that writes through immediately to the provider.

Every markDirty call triggers an immediate putObject — there is no buffering, TTL, or debouncing. Useful when caching is unwanted but the VFS still expects a CacheStore implementation.

Implements

Constructors

Constructor

new PassThroughCache(provider): PassThroughCache

Defined in: cache/passthrough.ts:18

Parameters

provider

StorageProvider

Returns

PassThroughCache

Methods

clear()

clear(): Promise<void>

Defined in: cache/passthrough.ts:45

Returns

Promise<void>

Implementation of

CacheStore.clear


delete()

delete(cacheKey): Promise<void>

Defined in: cache/passthrough.ts:42

Parameters

cacheKey

string

Returns

Promise<void>

Implementation of

CacheStore.delete


dirtyEntries()

dirtyEntries(): string[]

Defined in: cache/passthrough.ts:39

Returns

string[]

Implementation of

CacheStore.dirtyEntries


flush()

flush(): Promise<void>

Defined in: cache/passthrough.ts:48

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/passthrough.ts:20

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/passthrough.ts:36

Parameters

_cacheKey

string

Returns

boolean

Implementation of

CacheStore.isDirty


markDirty()

markDirty(cacheKey, root, key): void

Defined in: cache/passthrough.ts:28

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/passthrough.ts:24

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.