{"library":"safe-memory-cache","type":"library","category":null,"description":"A lightweight, secure in-memory cache library for Node.js and browsers, currently at version 3.0.0. It limits the number of stored items without using JavaScript's `delete` operator to avoid memory leaks and hidden class changes, and instead uses a bucket-based eviction strategy that removes the oldest bucket when full. It is immune to prototype poisoning attacks via malicious keys like `__proto__` and avoids individual timeout timers per cached item. Main differentiators include defensive coding against prototype pollution, gradual memory freeing, and minimal overhead.","language":"javascript","status":"active","version":"3.0.0","tags":["javascript","memory","cache","secure","safe","ram","simple","storage"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install safe-memory-cache","imports":["import { safeMemoryCache } from 'safe-memory-cache'","const { safeMemoryCache } = require('safe-memory-cache')","import type { SafeMemoryCache } from 'safe-memory-cache'"]},{"cmd":"yarn add safe-memory-cache","imports":[]},{"cmd":"pnpm add safe-memory-cache","imports":[]}],"homepage":"https://github.com/naugtur/safe-memory-cache","github":"https://github.com/naugtur/safe-memory-cache","docs":null,"changelog":null,"pypi":null,"npm":"safe-memory-cache","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}