{"id":44487,"library":"cache-manager-memory-store","title":"cache-manager-memory-store","description":"Extremely simple in-memory store for node-cache-manager, primarily used for unit testing. Version 1.1.0 is stable with no active release cadence; the built-in memory store in cache-manager already exists, making this package redundant for production use. It only maintains an in-memory object and does not support TTL. Tests exist solely to verify interface compliance.","status":"active","version":"1.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/theogravity/node-cache-manager-memory-store","tags":["javascript","node-cache-manager","cache-manager","store"],"install":[{"cmd":"npm install cache-manager-memory-store","lang":"bash","label":"npm"},{"cmd":"yarn add cache-manager-memory-store","lang":"bash","label":"yarn"},{"cmd":"pnpm add cache-manager-memory-store","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required to use the store with caching","package":"cache-manager","optional":false}],"imports":[{"note":"Package is ESM-only; CommonJS require will fail.","wrong":"const MemoryStore = require('cache-manager-memory-store')","symbol":"default","correct":"import MemoryStore from 'cache-manager-memory-store'"},{"note":"No named export; use default import.","wrong":"import { MemoryStore } from 'cache-manager-memory-store'","symbol":"MemoryStore","correct":"import MemoryStore from 'cache-manager-memory-store'"},{"note":"MemoryStore is default export, not named.","wrong":"import cacheManager from 'cache-manager'; import { MemoryStore } from 'cache-manager-memory-store';","symbol":"cacheManager.caching({ store: MemoryStore })","correct":"import cacheManager from 'cache-manager'; import MemoryStore from 'cache-manager-memory-store'; cacheManager.caching({ store: MemoryStore })"}],"quickstart":{"code":"import cacheManager from 'cache-manager';\nimport MemoryStore from 'cache-manager-memory-store';\n\nconst cache = cacheManager.caching({ store: MemoryStore });\n\nawait cache.set('key', 'value');\nconst val = await cache.get('key');\nconsole.log(val); // 'value'","lang":"typescript","description":"Shows basic usage: initialize cache with memory store, set and get a value."},"warnings":[{"fix":"Do not rely on TTL; use this store only for testing where TTL is not required.","message":"TTL is not supported; setting TTL options will be ignored or may cause unexpected behavior.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Omit the store parameter entirely to use the built-in memory store.","message":"This package is redundant: node-cache-manager already has a built-in memory store as default when no store is specified.","severity":"gotcha","affected_versions":"all"},{"fix":"Use ES module import syntax or migrate to dynamic import().","message":"Package is ESM-only; CommonJS require() will throw an error.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.1.0':23 'activ':28 'alreadi':41 'built':33 'built-in':32 'cach':2,15,39,73,76 'cache-manag':38,75 'cache-manager-memory-stor':1 'cadenc':30 'complianc':69 'exist':42,64 'extrem':6 'in-memori':8,54 'interfac':68 'javascript':70 'maintain':52 'make':43 'manag':3,16,40,74,77 'memori':4,10,35,56 'node':14,72 'node-cache-manag':13,71 'object':57 'packag':45 'primarili':17 'product':48 'redund':46 'releas':29 'simpl':7 'sole':65 'stabl':25 'store':5,11,36,78 'support':61 'test':21,63 'ttl':62 'unit':20 'use':18,49 'verifi':67 'version':22","created_at":"2026-06-07T12:50:21.986098+00:00","updated_at":"2026-06-07T12:50:21.986098+00:00","problems":[{"fix":"Change 'const MemoryStore = require(...)' to 'import MemoryStore from ...'","cause":"Using CommonJS require() on an ESM-only package.","error":"Must use import to load ES Module: require() of ES Module not supported."},{"fix":"Import only the main entry point: 'cache-manager-memory-store'","cause":"Attempting to require or import a non-exported subpath.","error":"ERR_PACKAGE_PATH_NOT_EXPORTED: Package subpath './package.json' is not defined by \"exports\""},{"fix":"Use default import: import MemoryStore from 'cache-manager-memory-store'","cause":"Importing MemoryStore as a named export instead of default.","error":"TypeError: MemoryStore is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/theogravity/node-cache-manager-memory-store#readme","github":"https://github.com/theogravity/node-cache-manager-memory-store","docs":null,"changelog":null,"pypi":null,"npm":"cache-manager-memory-store","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}