Lightweight in-memory key-value storage with TTL support for Erxes ecosystem. Version 1.0.20 is the current stable release. No recent updates; maintenance mode. Differentiators: simple API with set/get/remove methods and per-key TTL. Alternative is redis.
npm install erxes-inmemory-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates in-memory storage instance, sets a key with TTL, reads it, and removes it.
Multiply seconds by 1000 when passing TTL.
Use a persistent store (e.g., redis) if data must survive restarts.
Explicitly serialize/deserialize non-string values (e.g., JSON.stringify/parse).
Consider migrating to a more maintained in-memory storage solution.
Use: import InMemoryStorage from 'erxes-inmemory-storage'
Ensure TTL is in milliseconds (e.g., 10000 for 10 seconds).
Make sure to call 'new InMemoryStorage()' before using methods.
No dependency data recorded yet.