Registry / storage / expeditious-engine-memory

expeditious-engine-memory

JSON →
library0.2.1jsnpmunverified

An in-memory cache engine for the expeditious caching library. Stores cache entries in Node.js process memory (version 0.2.1). This engine is stateful and ephemeral: all data is lost on process restart. Key differentiators: extremely simple setup with no external dependencies, ideal for single-process applications or development environments. However, it may cause memory bloat and GC pressure with large caches. Not recommended for production use cases requiring persistence or multitenancy.

npm install expeditious-engine-memory
INSTALL
IMPORT
SIG · EXPEDITIOUS-ENGINE
E
expeditious-engine-memory
storagejavascriptv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

the function returned by require()
const engine = require('expeditious-engine-memory')()
const engine = require('expeditious-engine-memory')
package exports a factory function that MUST be called (no arguments) to create an engine instance.
the engine instance as an expeditious engine option
engine: require('expeditious-engine-memory')()
engine: require('expeditious-engine-memory')
You must invoke the factory, not pass the require result directly.
CommonJS require pattern
const engine = require('expeditious-engine-memory')()
import engine from 'expeditious-engine-memory'
Package does not support ESM imports. Use require() only.

Demonstrates creating an in-memory cache engine instance and using it with the expeditious library. Shows set operation.

const expeditious = require('expeditious'); const engine = require('expeditious-engine-memory')(); const cache = expeditious({ engine: engine, namespace: 'example', defaultTtl: 60000 // 60 seconds }); cache.set({ key: 'hello', value: 'world' }, (err) => { if (err) { console.error('set failed'); } else { console.log('set succeeded'); } });
Debug
Known issues
gotchaFactory function must be called: require('...')() not just require('...')
fix
Invoke the factory: const engine = require('expeditious-engine-memory')()
affects: all
breakingNo ESM support. Package does not export an ES module.
fix
Use CommonJS require() instead of import
affects: all
gotchaData is not persisted across process restarts; all cached entries are lost on server restart.
fix
For persistent caching, use a different engine like file-system or Redis.
affects: all
gotchaMemory usage grows unbounded if cache is not flushed or entries do not expire; can cause OOM or GC issues.
fix
Set reasonable TTLs and call flush() periodically if needed.
affects: all
Errors
Common errors & fixes
TypeError: engine is not a function
Forgetting to call the factory function when passing to expeditious.
fix
const engine = require('expeditious-engine-memory')()
Error: Cannot find module 'expeditious'
Using the engine standalone without installing expeditious, or not having expeditious installed.
fix
npm install expeditious
TypeError: this.keys is not a function
Calling engine methods directly on the factory module instead of a created instance.
fix
Create an instance: const engine = require('expeditious-engine-memory')(); then use engine.get/set etc.
Upgrade
Version history
0.2.1latest on npm
Audit
Dependencies
expeditiousoptionalPrimary intended use is as an engine for the expeditious caching library. Standalone use is possible but not recommended.
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
expeditious-engine-memory — npm install expeditious-engine-memory · libregistry