File cache adapter for ThinkJS framework (v1.1.2, stable). Provides a file-based caching mechanism with configurable cache path, depth, and garbage collection interval. Designed specifically for ThinkJS's cache system. Alternative to in-memory or database caches. No longer maintained alongside ThinkJS's evolution.
npm install think-cache-fileNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Instantiates file cache adapter, sets and retrieves a cached value.
Provide absolute path like '/home/user/data' or use path.resolve().
Use think-cache-file if still on ThinkJS 3, or migrate to think-model-cache or other solutions.
Explicitly set gcInterval in config, e.g., 24*60*60*1000 for daily cleanup.
Keep pathDepth low (0-2). Use 0 for flat directory.
Ensure timeout values are in milliseconds (e.g., 60000 for 1 minute).
Use `import fileCache from 'think-cache-file';`
Create the directory manually or ensure it exists before starting the app.
Use `new fileCache(options)` to instantiate.
No dependency data recorded yet.