{"library":"read-cache","type":"library","category":null,"description":"Minimalistic library (v1.0.0, stable) that reads a file into memory and caches its contents, invalidating the cache when the file's modification time changes. Returns promises (async) and offers sync variants. No dependencies, ESM/CJS compatible. Key differentiator: automatic cache invalidation via stat() on every read, avoiding stale data without explicit TTL or watchers. Suitable for small config files or one-shot reads where performance is not critical.","language":"javascript","status":"active","version":"1.0.0","tags":["javascript","fs","read","cache"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install read-cache","imports":["import readCache from 'read-cache'","import readCache from 'read-cache'; readCache.sync('file.txt')","import readCache from 'read-cache'; readCache.clear()"]},{"cmd":"yarn add read-cache","imports":[]},{"cmd":"pnpm add read-cache","imports":[]}],"homepage":"https://github.com/TrySound/read-cache#readme","github":"https://github.com/TrySound/read-cache","docs":null,"changelog":null,"pypi":null,"npm":"read-cache","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}