{"id":45221,"library":"kitten-cache","title":"kitten-cache","description":"Simple LRU (Least Recently Used) cache for Node.js. Current version 0.3.0, infrequent updates. Provides basic set/get/has/delete operations with configurable size and optional onRemove callback. No external dependencies. Similar to lru-cache but minimal API.","status":"active","version":"0.3.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install kitten-cache","lang":"bash","label":"npm"},{"cmd":"yarn add kitten-cache","lang":"bash","label":"yarn"},{"cmd":"pnpm add kitten-cache","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package uses CommonJS; ES import is not supported.","wrong":"import Cache from 'kitten-cache';","symbol":"Cache","correct":"const Cache = require('kitten-cache');"},{"note":"Direct named export is not available; the module exports a single constructor function.","wrong":"const { Cache } = require('kitten-cache').default;","symbol":"Cache","correct":"const { Cache } = require('kitten-cache');"},{"note":"Alternative CommonJS pattern if preferred.","wrong":"","symbol":"Cache","correct":"let cache = new (require('kitten-cache'))();"}],"quickstart":{"code":"const Cache = require('kitten-cache');\n\nlet cache = new Cache({ size: 100 });\n\ncache.set('key1', 'value1');\ncache.set('key2', 42);\n\nif (cache.has('key1')) {\n  console.log(cache.get('key1')); // 'value1'\n}\n\ncache.delete('key2');\n\nconsole.log(cache.get('key2')); // undefined","lang":"javascript","description":"Shows creating a cache instance, setting and getting values, checking existence, and deleting entries."},"warnings":[{"fix":"Monitor cache size manually or use a different library for strict size limits.","message":"Cache size is not enforced strictly; the cache may exceed size if items are added quickly.","severity":"gotcha","affected_versions":"<=0.3.0"},{"fix":"Use lru-cache or node-cache if TTL is needed.","message":"No support for TTL (time-to-live) expiration.","severity":"deprecated","affected_versions":"all"},{"fix":"Create own .d.ts file or use // @ts-ignore.","message":"Package has no TypeScript type definitions.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.3.0':14 'api':38 'basic':18 'cach':3,9,35 'callback':27 'configur':22 'current':12 'depend':30 'extern':29 'infrequ':15 'javascript':39 'kitten':2 'kitten-cach':1 'least':6 'lru':5,34 'lru-cach':33 'minim':37 'node.js':11 'onremov':26 'oper':20 'option':25 'provid':17 'recent':7 'set/get/has/delete':19 'similar':31 'simpl':4 'size':23 'updat':16 'use':8 'version':13","created_at":"2026-06-07T12:53:56.896973+00:00","updated_at":"2026-06-07T12:53:56.896973+00:00","problems":[{"fix":"Run: npm install kitten-cache","cause":"Package not installed.","error":"Error: Cannot find module 'kitten-cache'"},{"fix":"Use: const Cache = require('kitten-cache');","cause":"Using ES6 import syntax instead of CommonJS require.","error":"TypeError: Cache is not a constructor"},{"fix":"Instantiate: let cache = new Cache(); then cache.get('key');","cause":"Cache instance not created correctly, e.g., calling Cache.get() directly on class.","error":"cache.get is not a function"}],"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":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"kitten-cache","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"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}}