Session storage for tasks, designed to pass data between gulp tasks or similar workflow steps. Current stable version is 0.2.0, released in 2015 with no updates since. It provides a simple context-based session object to store and retrieve key-value pairs, with methods to bind functions and EventEmitters. Lacks TypeScript support, tests, and modern ESM compatibility. Alternatives include async hooks or more maintained session libraries.
npm install session-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a session, setting/getting values, binding a function, and binding an EventEmitter.
Validate session names and keys to avoid code injection.
Create a .d.ts file or use type assertions.
Consider migrating to an actively maintained session library.
Use dynamic import if needed in ESM: `const session = (await import('session-cache')).default;`Use `const session = require('session-cache');` or `import session from 'session-cache';`Run `npm i session-cache --save` and ensure the package name is correct.
Ensure you call `session.bind(fn)` and that `fn` is invoked with the correct `this`.
No dependency data recorded yet.