A lightweight asynchronous task queue with built-in caching, timeout, throttle, and background prefetching. Version 0.2.8 is stable as of 2025, with infrequent releases. It differentiates from similar libraries (e.g., p-limit, memoizee) by combining queue, concurrency control, positive/negative caching, TTL-based expiration, background refresh, and optional external storage support in a single small package (~2KB gzipped). Ships TypeScript declarations and supports both CJS and ESM.
npm install async-cache-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a memoized async function with caching, concurrency limit, timeout, and background refresh.
Use 'storage' option with an external store if you need persistent caching; then manage TTL there.
N/A
N/A
Use import { queueFactory } from 'async-cache-queue' instead of import queueFactory from 'async-cache-queue'.Ensure the task function is async and does not call the memoized function synchronously in the same tick.
No dependency data recorded yet.