@lucid-softworks/cache-warm
v0.1.0
Published
Bounded-concurrency cache warming with per-value record policies.
Maintainers
Readme
@lucid-softworks/cache-warm
Bounded-concurrency cache warming for known key sets. Record policy can be static or derived from each loaded value.
await warmCache(productIds, loadProduct, {
concurrency: 8,
key: (id) => createCacheKey("product", [id]),
record: (product) => ({
ttl: 60_000,
tags: [`product:${product.id}`],
}),
store,
});