@nogoo9/mcp-server-cloud-fs / cache/filesystem / FilesystemStore
Class: FilesystemStore
Defined in: cache/filesystem.ts:25
Disk-backed cache store using SHA-256 hashed filenames.
Stores cached objects and metadata as pairs of .bin / .meta.json files in the configured directory. Supports TTL-based expiry and debounced flushing.
Implements
Constructors
Constructor
new FilesystemStore(
provider,cacheDir,opts):FilesystemStore
Defined in: cache/filesystem.ts:29
Parameters
provider
cacheDir
string
opts
syncDebounceMs
number
ttlMs
number
Returns
FilesystemStore
Methods
clear()
clear():
Promise<void>
Defined in: cache/filesystem.ts:92
Returns
Promise<void>
Implementation of
delete()
delete(
cacheKey):Promise<void>
Defined in: cache/filesystem.ts:84
Parameters
cacheKey
string
Returns
Promise<void>
Implementation of
dirtyEntries()
dirtyEntries():
string[]
Defined in: cache/filesystem.ts:80
Returns
string[]
Implementation of
flush()
flush():
Promise<void>
Defined in: cache/filesystem.ts:100
Cancels debounce timer; flushes all dirty entries to provider synchronously.
Returns
Promise<void>
Implementation of
get()
get(
cacheKey):Promise<Buffer<ArrayBufferLike> |null>
Defined in: cache/filesystem.ts:45
Returns null on cache miss or TTL expiry. Does NOT call the provider.
Parameters
cacheKey
string
Returns
Promise<Buffer<ArrayBufferLike> | null>
Implementation of
isDirty()
isDirty(
cacheKey):boolean
Defined in: cache/filesystem.ts:76
Parameters
cacheKey
string
Returns
boolean
Implementation of
markDirty()
markDirty(
cacheKey,root,key):void
Defined in: cache/filesystem.ts:71
Marks cacheKey dirty and records routing info for flush. Starts debounce timer.
Parameters
cacheKey
string
root
key
string
Returns
void
Implementation of
set()
set(
cacheKey,value):Promise<void>
Defined in: cache/filesystem.ts:62
Stores value with TTL; does NOT mark dirty.
Parameters
cacheKey
string
value
Buffer
Returns
Promise<void>
