Aragami is a cache ORM for Node.js that provides decorator-based caching, locking, and CRUD operations with TypeScript support. Current stable version is 1.2.12. It offers an intuitive API using decorators like @CachePrefix, @CacheTTL, @CacheKey, and @LockKey to manage caching on class instances. Key differentiators include built-in distributed locking, redis support, and cache-aside pattern via wrap/useLock utilities. Release cadence is low; the package has not been updated recently. Ideal for projects needing simple, decorator-driven caching with ORM-like semantics.
npm install aragamiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of Aragami with Redis, a decorated User class, and set/get/delete operations.
Always add @CacheKey() to a unique identifier field in your class.
Gracefully shutdown the Aragami instance with aragami.disconnect() before exiting.
Use aragami.lock() or aragami.useLock() to acquire locks based on @LockKey fields.
Use named import: import { Aragami } from 'aragami' and create instance: const aragami = new Aragami();Start Redis server or set redis.url to a valid Redis instance.
Correct the method name: aragami.cache(User, 'John', () => database.get('John'));