{"library":"mharj-mongoose-cache","type":"library","category":null,"description":"An in-memory cache layer for Mongoose models that reduces database queries by maintaining a local copy of documents. Version 0.9.3, actively developed. Supports importing cached data from Mongoose queries, retrieving documents by ID or with list operations, and populating arrays of IDs. Can be synchronized via change streams, model hooks, or explicit add/delete calls. Emits events for cache updates, suitable for pushing data to presentation layers like websockets. Requires Mongoose >= 6.0.0 and @avanio/logger-like >= 0.0.1 as peer dependencies. Compared to mongoose-lean-cache or query-level caching, this provides a model-level cache with a simple API and change stream integration.","language":"javascript","status":"active","version":"0.9.3","tags":["javascript","mongo","mongoose","cache","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install mharj-mongoose-cache","imports":["import { ModelCache } from 'mharj-mongoose-cache'","import { ModelCache } from 'mharj-mongoose-cache'"]},{"cmd":"yarn add mharj-mongoose-cache","imports":[]},{"cmd":"pnpm add mharj-mongoose-cache","imports":[]}],"homepage":"https://github.com/mharj/mongoose-cache#readme","github":"https://github.com/mharj/mongoose-cache","docs":null,"changelog":null,"pypi":null,"npm":"mharj-mongoose-cache","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}