A lightweight Redis-backed state management library for persistent programming. Version 3.0.88 provides a simple API to store, retrieve, and delete state objects in Redis, with support for expiration and serialization. It is designed for server-side applications needing durable session or workflow state. The package is actively maintained with frequent updates. Compared to alternatives, it offers minimal abstraction and direct Redis commands, making it suitable for projects already using Redis. Requires ioredis >=5 and is ESM-only since v3.
npm install persistent-programming-redis-stateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a RedisState instance, set, get, and delete state objects.
Use import syntax or dynamic import().
Use options.namespace: 'myapp:'.
Ensure values are JSON-serializable.
Convert Date to seconds: Math.floor((date.getTime() - Date.now()) / 1000).
Use import or set { "type": "module" } in package.json.Remove circular references or use a replacer function.
Use default import: import RedisState from 'persistent-programming-redis-state'.