@warlock.js/cache 5.17.1 → 5.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/llms-full.txt +20 -20
- package/llms.txt +20 -20
- package/package.json +3 -3
- package/skills/apply-cache-patterns/SKILL.md +1 -1
- package/skills/cache-basics/SKILL.md +1 -1
- package/skills/configure-pg-cache/SKILL.md +1 -1
- package/skills/configure-set-options/SKILL.md +1 -1
- package/skills/handle-cache-errors/SKILL.md +1 -1
- package/skills/observe-cache/SKILL.md +1 -1
- package/skills/overview/SKILL.md +1 -1
- package/skills/pick-cache-driver/SKILL.md +1 -1
- package/skills/test-cache-code/SKILL.md +1 -1
- package/skills/use-cache-atomic/SKILL.md +1 -1
- package/skills/use-cache-bulk/SKILL.md +1 -1
- package/skills/use-cache-list/SKILL.md +1 -1
- package/skills/use-cache-lock/SKILL.md +1 -1
- package/skills/use-cache-namespace/SKILL.md +1 -1
- package/skills/use-cache-similarity/SKILL.md +1 -1
- package/skills/use-cache-tags/SKILL.md +1 -1
- package/skills/use-cache-update-merge/SKILL.md +1 -1
- package/skills/use-cache-utils/SKILL.md +1 -1
- package/skills/use-cached-hof/SKILL.md +1 -1
- package/skills/use-swr/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,13 @@ All notable changes to `@warlock.js/cache` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
-
## 5.
|
|
7
|
+
## 5.19.0 - 2026-09-23
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Refined package skill-discovery descriptions and regenerated the llms projections.
|
|
12
|
+
|
|
13
|
+
## 5.17.0
|
|
8
14
|
|
|
9
15
|
### Changed
|
|
10
16
|
|
package/llms-full.txt
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
name: apply-cache-patterns
|
|
11
|
-
description:
|
|
11
|
+
description: "Real-world caching patterns in @warlock.js/cache; use when you need to apply cache patterns."
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# Real-world caching patterns
|
|
@@ -109,7 +109,7 @@ await cache.tags([`tenant-${tenantId}`]).invalidate();
|
|
|
109
109
|
|
|
110
110
|
---
|
|
111
111
|
name: cache-basics
|
|
112
|
-
description:
|
|
112
|
+
description: "Start here for @warlock.js/cache drivers, key-value operations, and application cache configuration."
|
|
113
113
|
---
|
|
114
114
|
|
|
115
115
|
# Cache basics
|
|
@@ -236,7 +236,7 @@ const user = await cache.remember("user.1", "1h", async () => db.users.find(1));
|
|
|
236
236
|
|
|
237
237
|
---
|
|
238
238
|
name: configure-pg-cache
|
|
239
|
-
description:
|
|
239
|
+
description: "pg cache driver — Postgres setup in @warlock.js/cache; use when you need to configure pg cache."
|
|
240
240
|
---
|
|
241
241
|
|
|
242
242
|
# `pg` cache driver — Postgres setup
|
|
@@ -355,7 +355,7 @@ See [`@warlock.js/cache/handle-cache-errors/SKILL.md`](@warlock.js/cache/handle-
|
|
|
355
355
|
|
|
356
356
|
---
|
|
357
357
|
name: configure-set-options
|
|
358
|
-
description:
|
|
358
|
+
description: "The set options object in @warlock.js/cache; use when you need to configure set options."
|
|
359
359
|
---
|
|
360
360
|
|
|
361
361
|
# The `set` options object
|
|
@@ -455,7 +455,7 @@ await cache.set("k", v, undefined); // same as no TTL
|
|
|
455
455
|
|
|
456
456
|
---
|
|
457
457
|
name: handle-cache-errors
|
|
458
|
-
description:
|
|
458
|
+
description: "Error classes in @warlock.js/cache; use when you need to handle cache errors."
|
|
459
459
|
---
|
|
460
460
|
|
|
461
461
|
# Error classes
|
|
@@ -551,7 +551,7 @@ try {
|
|
|
551
551
|
|
|
552
552
|
---
|
|
553
553
|
name: observe-cache
|
|
554
|
-
description:
|
|
554
|
+
description: "Cache observability — cache.metrics() and the event bus in @warlock.js/cache; use when you need to observe cache."
|
|
555
555
|
---
|
|
556
556
|
|
|
557
557
|
# Cache observability — `cache.metrics()` and the event bus
|
|
@@ -658,7 +658,7 @@ Drivers that never fire events stay absent from `byDriver` — guard with `?.` a
|
|
|
658
658
|
|
|
659
659
|
---
|
|
660
660
|
name: overview
|
|
661
|
-
description:
|
|
661
|
+
description: "@warlock.js/cache overview for orientation and choosing the focused skill for the task."
|
|
662
662
|
---
|
|
663
663
|
|
|
664
664
|
# `@warlock.js/cache` — overview
|
|
@@ -731,7 +731,7 @@ Nineteen task skills. Most apps start with `cache-basics` + `pick-cache-driver`
|
|
|
731
731
|
|
|
732
732
|
---
|
|
733
733
|
name: pick-cache-driver
|
|
734
|
-
description:
|
|
734
|
+
description: "Cache drivers — pick the right one in @warlock.js/cache; use when you need to choose cache driver."
|
|
735
735
|
---
|
|
736
736
|
|
|
737
737
|
# Cache drivers — pick the right one
|
|
@@ -858,7 +858,7 @@ The manager loads (and connects) the override driver lazily on first use, then r
|
|
|
858
858
|
|
|
859
859
|
---
|
|
860
860
|
name: test-cache-code
|
|
861
|
-
description:
|
|
861
|
+
description: "Testing code that touches cache in @warlock.js/cache; use when you need to test cache code."
|
|
862
862
|
---
|
|
863
863
|
|
|
864
864
|
# Testing code that touches cache
|
|
@@ -1081,7 +1081,7 @@ The `pg` driver accepts any object satisfying `PgClientLike` (`{ query(text, val
|
|
|
1081
1081
|
|
|
1082
1082
|
---
|
|
1083
1083
|
name: use-cache-atomic
|
|
1084
|
-
description:
|
|
1084
|
+
description: "Atomic counters — cache.increment / cache.decrement in @warlock.js/cache; use when you need to use cache atomic."
|
|
1085
1085
|
---
|
|
1086
1086
|
|
|
1087
1087
|
# Atomic counters — `cache.increment` / `cache.decrement`
|
|
@@ -1152,7 +1152,7 @@ if (remaining < 0) {
|
|
|
1152
1152
|
|
|
1153
1153
|
---
|
|
1154
1154
|
name: use-cache-bulk
|
|
1155
|
-
description:
|
|
1155
|
+
description: "Bulk operations — cache.many / cache.setMany in @warlock.js/cache; use when you need to use cache bulk."
|
|
1156
1156
|
---
|
|
1157
1157
|
|
|
1158
1158
|
# Bulk operations — `cache.many` / `cache.setMany`
|
|
@@ -1213,7 +1213,7 @@ returned promise rejects.
|
|
|
1213
1213
|
|
|
1214
1214
|
---
|
|
1215
1215
|
name: use-cache-list
|
|
1216
|
-
description:
|
|
1216
|
+
description: "Lists — the cache.list<T>(key) sub-API in @warlock.js/cache; use when you need to use cache list."
|
|
1217
1217
|
---
|
|
1218
1218
|
|
|
1219
1219
|
# Lists — the `cache.list<T>(key)` sub-API
|
|
@@ -1302,7 +1302,7 @@ These are tracked as candidates for v3.
|
|
|
1302
1302
|
|
|
1303
1303
|
---
|
|
1304
1304
|
name: use-cache-lock
|
|
1305
|
-
description:
|
|
1305
|
+
description: "cache.lock() — distributed locks with auto-release in @warlock.js/cache; use when you need to use cache lock."
|
|
1306
1306
|
---
|
|
1307
1307
|
|
|
1308
1308
|
# `cache.lock()` — distributed locks with auto-release
|
|
@@ -1410,7 +1410,7 @@ await cache.lock(
|
|
|
1410
1410
|
|
|
1411
1411
|
---
|
|
1412
1412
|
name: use-cache-namespace
|
|
1413
|
-
description:
|
|
1413
|
+
description: "Scoped caches — cache.namespace(prefix, options?) in @warlock.js/cache; use when you need to use cache namespace."
|
|
1414
1414
|
---
|
|
1415
1415
|
|
|
1416
1416
|
# Scoped caches — `cache.namespace(prefix, options?)`
|
|
@@ -1502,7 +1502,7 @@ Note: scope `ttl` defaults are NOT applied to SWR — `freshTtl` / `staleTtl` al
|
|
|
1502
1502
|
|
|
1503
1503
|
---
|
|
1504
1504
|
name: use-cache-similarity
|
|
1505
|
-
description:
|
|
1505
|
+
description: "cache.similar() — vector-based retrieval in @warlock.js/cache; use when you need to use cache similarity."
|
|
1506
1506
|
---
|
|
1507
1507
|
|
|
1508
1508
|
# `cache.similar()` — vector-based retrieval
|
|
@@ -1600,7 +1600,7 @@ See [`@warlock.js/cache/configure-pg-cache/SKILL.md`](@warlock.js/cache/configur
|
|
|
1600
1600
|
|
|
1601
1601
|
---
|
|
1602
1602
|
name: use-cache-tags
|
|
1603
|
-
description:
|
|
1603
|
+
description: "Tag-based invalidation in @warlock.js/cache; use when you need to use cache tags."
|
|
1604
1604
|
---
|
|
1605
1605
|
|
|
1606
1606
|
# Tag-based invalidation
|
|
@@ -1689,7 +1689,7 @@ See [`@warlock.js/cache/use-cached-hof/SKILL.md`](@warlock.js/cache/use-cached-h
|
|
|
1689
1689
|
|
|
1690
1690
|
---
|
|
1691
1691
|
name: use-cache-update-merge
|
|
1692
|
-
description:
|
|
1692
|
+
description: "update and merge — atomic read-modify-write in @warlock.js/cache; use when you need to use cache update merge."
|
|
1693
1693
|
---
|
|
1694
1694
|
|
|
1695
1695
|
# `update` and `merge` — atomic read-modify-write
|
|
@@ -1777,7 +1777,7 @@ The per-key lock map lives on the driver instance and is cleared after each chai
|
|
|
1777
1777
|
|
|
1778
1778
|
---
|
|
1779
1779
|
name: use-cache-utils
|
|
1780
|
-
description:
|
|
1780
|
+
description: "Cache utilities in @warlock.js/cache; use when you need to use cache utils."
|
|
1781
1781
|
---
|
|
1782
1782
|
|
|
1783
1783
|
# Cache utilities
|
|
@@ -1870,7 +1870,7 @@ For most call sites the duration string (`"1h"`, `"7d"`) reads better.
|
|
|
1870
1870
|
|
|
1871
1871
|
---
|
|
1872
1872
|
name: use-cached-hof
|
|
1873
|
-
description:
|
|
1873
|
+
description: "cached() — function-memoization wrapper in @warlock.js/cache; use when you need to use cached hof."
|
|
1874
1874
|
---
|
|
1875
1875
|
|
|
1876
1876
|
# `cached()` — function-memoization wrapper
|
|
@@ -1976,7 +1976,7 @@ const getCategoryMeta = cached(
|
|
|
1976
1976
|
|
|
1977
1977
|
---
|
|
1978
1978
|
name: use-swr
|
|
1979
|
-
description:
|
|
1979
|
+
description: "Stale-while-revalidate — cache.swr(key, options, fn) in @warlock.js/cache; use when you need to use swr."
|
|
1980
1980
|
---
|
|
1981
1981
|
|
|
1982
1982
|
# Stale-while-revalidate — `cache.swr(key, options, fn)`
|
package/llms.txt
CHANGED
|
@@ -6,23 +6,23 @@
|
|
|
6
6
|
|
|
7
7
|
## Skills
|
|
8
8
|
|
|
9
|
-
- [apply-cache-patterns](@warlock.js/cache/apply-cache-patterns/SKILL.md):
|
|
10
|
-
- [cache-basics](@warlock.js/cache/cache-basics/SKILL.md): Start
|
|
11
|
-
- [configure-pg-cache](@warlock.js/cache/configure-pg-cache/SKILL.md):
|
|
12
|
-
- [configure-set-options](@warlock.js/cache/configure-set-options/SKILL.md):
|
|
13
|
-
- [handle-cache-errors](@warlock.js/cache/handle-cache-errors/SKILL.md):
|
|
14
|
-
- [observe-cache](@warlock.js/cache/observe-cache/SKILL.md): Cache observability — cache.metrics()
|
|
15
|
-
- [overview](@warlock.js/cache/overview/SKILL.md):
|
|
16
|
-
- [pick-cache-driver](@warlock.js/cache/pick-cache-driver/SKILL.md):
|
|
17
|
-
- [test-cache-code](@warlock.js/cache/test-cache-code/SKILL.md):
|
|
18
|
-
- [use-cache-atomic](@warlock.js/cache/use-cache-atomic/SKILL.md): Atomic counters
|
|
19
|
-
- [use-cache-bulk](@warlock.js/cache/use-cache-bulk/SKILL.md): Bulk
|
|
20
|
-
- [use-cache-list](@warlock.js/cache/use-cache-list/SKILL.md):
|
|
21
|
-
- [use-cache-lock](@warlock.js/cache/use-cache-lock/SKILL.md):
|
|
22
|
-
- [use-cache-namespace](@warlock.js/cache/use-cache-namespace/SKILL.md):
|
|
23
|
-
- [use-cache-similarity](@warlock.js/cache/use-cache-similarity/SKILL.md):
|
|
24
|
-
- [use-cache-tags](@warlock.js/cache/use-cache-tags/SKILL.md): Tag-based invalidation
|
|
25
|
-
- [use-cache-update-merge](@warlock.js/cache/use-cache-update-merge/SKILL.md):
|
|
26
|
-
- [use-cache-utils](@warlock.js/cache/use-cache-utils/SKILL.md):
|
|
27
|
-
- [use-cached-hof](@warlock.js/cache/use-cached-hof/SKILL.md):
|
|
28
|
-
- [use-swr](@warlock.js/cache/use-swr/SKILL.md): Stale-while-revalidate
|
|
9
|
+
- [apply-cache-patterns](@warlock.js/cache/apply-cache-patterns/SKILL.md): Real-world caching patterns in @warlock.js/cache; use when you need to apply cache patterns.
|
|
10
|
+
- [cache-basics](@warlock.js/cache/cache-basics/SKILL.md): Start here for @warlock.js/cache drivers, key-value operations, and application cache configuration.
|
|
11
|
+
- [configure-pg-cache](@warlock.js/cache/configure-pg-cache/SKILL.md): pg cache driver — Postgres setup in @warlock.js/cache; use when you need to configure pg cache.
|
|
12
|
+
- [configure-set-options](@warlock.js/cache/configure-set-options/SKILL.md): The set options object in @warlock.js/cache; use when you need to configure set options.
|
|
13
|
+
- [handle-cache-errors](@warlock.js/cache/handle-cache-errors/SKILL.md): Error classes in @warlock.js/cache; use when you need to handle cache errors.
|
|
14
|
+
- [observe-cache](@warlock.js/cache/observe-cache/SKILL.md): Cache observability — cache.metrics() and the event bus in @warlock.js/cache; use when you need to observe cache.
|
|
15
|
+
- [overview](@warlock.js/cache/overview/SKILL.md): @warlock.js/cache overview for orientation and choosing the focused skill for the task.
|
|
16
|
+
- [pick-cache-driver](@warlock.js/cache/pick-cache-driver/SKILL.md): Cache drivers — pick the right one in @warlock.js/cache; use when you need to choose cache driver.
|
|
17
|
+
- [test-cache-code](@warlock.js/cache/test-cache-code/SKILL.md): Testing code that touches cache in @warlock.js/cache; use when you need to test cache code.
|
|
18
|
+
- [use-cache-atomic](@warlock.js/cache/use-cache-atomic/SKILL.md): Atomic counters — cache.increment / cache.decrement in @warlock.js/cache; use when you need to use cache atomic.
|
|
19
|
+
- [use-cache-bulk](@warlock.js/cache/use-cache-bulk/SKILL.md): Bulk operations — cache.many / cache.setMany in @warlock.js/cache; use when you need to use cache bulk.
|
|
20
|
+
- [use-cache-list](@warlock.js/cache/use-cache-list/SKILL.md): Lists — the cache.list<T>(key) sub-API in @warlock.js/cache; use when you need to use cache list.
|
|
21
|
+
- [use-cache-lock](@warlock.js/cache/use-cache-lock/SKILL.md): cache.lock() — distributed locks with auto-release in @warlock.js/cache; use when you need to use cache lock.
|
|
22
|
+
- [use-cache-namespace](@warlock.js/cache/use-cache-namespace/SKILL.md): Scoped caches — cache.namespace(prefix, options?) in @warlock.js/cache; use when you need to use cache namespace.
|
|
23
|
+
- [use-cache-similarity](@warlock.js/cache/use-cache-similarity/SKILL.md): cache.similar() — vector-based retrieval in @warlock.js/cache; use when you need to use cache similarity.
|
|
24
|
+
- [use-cache-tags](@warlock.js/cache/use-cache-tags/SKILL.md): Tag-based invalidation in @warlock.js/cache; use when you need to use cache tags.
|
|
25
|
+
- [use-cache-update-merge](@warlock.js/cache/use-cache-update-merge/SKILL.md): update and merge — atomic read-modify-write in @warlock.js/cache; use when you need to use cache update merge.
|
|
26
|
+
- [use-cache-utils](@warlock.js/cache/use-cache-utils/SKILL.md): Cache utilities in @warlock.js/cache; use when you need to use cache utils.
|
|
27
|
+
- [use-cached-hof](@warlock.js/cache/use-cached-hof/SKILL.md): cached() — function-memoization wrapper in @warlock.js/cache; use when you need to use cached hof.
|
|
28
|
+
- [use-swr](@warlock.js/cache/use-swr/SKILL.md): Stale-while-revalidate — cache.swr(key, options, fn) in @warlock.js/cache; use when you need to use swr.
|
package/package.json
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"environment": "server"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@warlock.js/fs": "5.
|
|
8
|
+
"@warlock.js/fs": "5.19.0",
|
|
9
9
|
"@mongez/reinforcements": "^4.0.1",
|
|
10
|
-
"@warlock.js/logger": "5.
|
|
10
|
+
"@warlock.js/logger": "5.19.0",
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
],
|
|
47
47
|
"author": "hassanzohdy",
|
|
48
48
|
"license": "MIT",
|
|
49
|
-
"version": "5.
|
|
49
|
+
"version": "5.19.0",
|
|
50
50
|
"main": "./cjs/index.cjs",
|
|
51
51
|
"module": "./esm/index.mjs",
|
|
52
52
|
"types": "./esm/index.d.mts",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apply-cache-patterns
|
|
3
|
-
description:
|
|
3
|
+
description: "Real-world caching patterns in @warlock.js/cache; use when you need to apply cache patterns."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Real-world caching patterns
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cache-basics
|
|
3
|
-
description:
|
|
3
|
+
description: "Start here for @warlock.js/cache drivers, key-value operations, and application cache configuration."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Cache basics
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure-pg-cache
|
|
3
|
-
description:
|
|
3
|
+
description: "pg cache driver — Postgres setup in @warlock.js/cache; use when you need to configure pg cache."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# `pg` cache driver — Postgres setup
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure-set-options
|
|
3
|
-
description:
|
|
3
|
+
description: "The set options object in @warlock.js/cache; use when you need to configure set options."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# The `set` options object
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: handle-cache-errors
|
|
3
|
-
description:
|
|
3
|
+
description: "Error classes in @warlock.js/cache; use when you need to handle cache errors."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Error classes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: observe-cache
|
|
3
|
-
description:
|
|
3
|
+
description: "Cache observability — cache.metrics() and the event bus in @warlock.js/cache; use when you need to observe cache."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Cache observability — `cache.metrics()` and the event bus
|
package/skills/overview/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: overview
|
|
3
|
-
description:
|
|
3
|
+
description: "@warlock.js/cache overview for orientation and choosing the focused skill for the task."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# `@warlock.js/cache` — overview
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pick-cache-driver
|
|
3
|
-
description:
|
|
3
|
+
description: "Cache drivers — pick the right one in @warlock.js/cache; use when you need to choose cache driver."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Cache drivers — pick the right one
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-cache-code
|
|
3
|
-
description:
|
|
3
|
+
description: "Testing code that touches cache in @warlock.js/cache; use when you need to test cache code."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Testing code that touches cache
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cache-atomic
|
|
3
|
-
description:
|
|
3
|
+
description: "Atomic counters — cache.increment / cache.decrement in @warlock.js/cache; use when you need to use cache atomic."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Atomic counters — `cache.increment` / `cache.decrement`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cache-bulk
|
|
3
|
-
description:
|
|
3
|
+
description: "Bulk operations — cache.many / cache.setMany in @warlock.js/cache; use when you need to use cache bulk."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Bulk operations — `cache.many` / `cache.setMany`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cache-list
|
|
3
|
-
description:
|
|
3
|
+
description: "Lists — the cache.list<T>(key) sub-API in @warlock.js/cache; use when you need to use cache list."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Lists — the `cache.list<T>(key)` sub-API
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cache-lock
|
|
3
|
-
description:
|
|
3
|
+
description: "cache.lock() — distributed locks with auto-release in @warlock.js/cache; use when you need to use cache lock."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# `cache.lock()` — distributed locks with auto-release
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cache-namespace
|
|
3
|
-
description:
|
|
3
|
+
description: "Scoped caches — cache.namespace(prefix, options?) in @warlock.js/cache; use when you need to use cache namespace."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Scoped caches — `cache.namespace(prefix, options?)`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cache-similarity
|
|
3
|
-
description:
|
|
3
|
+
description: "cache.similar() — vector-based retrieval in @warlock.js/cache; use when you need to use cache similarity."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# `cache.similar()` — vector-based retrieval
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cache-tags
|
|
3
|
-
description:
|
|
3
|
+
description: "Tag-based invalidation in @warlock.js/cache; use when you need to use cache tags."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Tag-based invalidation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cache-update-merge
|
|
3
|
-
description:
|
|
3
|
+
description: "update and merge — atomic read-modify-write in @warlock.js/cache; use when you need to use cache update merge."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# `update` and `merge` — atomic read-modify-write
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cache-utils
|
|
3
|
-
description:
|
|
3
|
+
description: "Cache utilities in @warlock.js/cache; use when you need to use cache utils."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Cache utilities
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-cached-hof
|
|
3
|
-
description:
|
|
3
|
+
description: "cached() — function-memoization wrapper in @warlock.js/cache; use when you need to use cached hof."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# `cached()` — function-memoization wrapper
|
package/skills/use-swr/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-swr
|
|
3
|
-
description:
|
|
3
|
+
description: "Stale-while-revalidate — cache.swr(key, options, fn) in @warlock.js/cache; use when you need to use swr."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Stale-while-revalidate — `cache.swr(key, options, fn)`
|