@c9up/echo 0.2.3 → 0.2.5
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/README.md +1 -1
- package/dist/CacheManager.d.ts +13 -2
- package/dist/CacheManager.d.ts.map +1 -1
- package/dist/CacheManager.js +309 -56
- package/dist/CacheManager.js.map +1 -1
- package/dist/EchoProvider.d.ts.map +1 -1
- package/dist/EchoProvider.js +32 -3
- package/dist/EchoProvider.js.map +1 -1
- package/dist/StoreManager.d.ts +38 -11
- package/dist/StoreManager.d.ts.map +1 -1
- package/dist/StoreManager.js +80 -22
- package/dist/StoreManager.js.map +1 -1
- package/dist/bytes.d.ts +13 -0
- package/dist/bytes.d.ts.map +1 -0
- package/dist/bytes.js +35 -0
- package/dist/bytes.js.map +1 -0
- package/dist/claim.d.ts +15 -0
- package/dist/claim.d.ts.map +1 -0
- package/dist/claim.js +10 -0
- package/dist/claim.js.map +1 -0
- package/dist/configure.d.ts +1 -0
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +3 -0
- package/dist/configure.js.map +1 -1
- package/dist/console/cacheClear.d.ts +13 -0
- package/dist/console/cacheClear.d.ts.map +1 -0
- package/dist/console/cacheClear.js +69 -0
- package/dist/console/cacheClear.js.map +1 -0
- package/dist/console/cacheDelete.d.ts +11 -0
- package/dist/console/cacheDelete.d.ts.map +1 -0
- package/dist/console/cacheDelete.js +42 -0
- package/dist/console/cacheDelete.js.map +1 -0
- package/dist/console/cachePrune.d.ts +9 -0
- package/dist/console/cachePrune.d.ts.map +1 -0
- package/dist/console/cachePrune.js +35 -0
- package/dist/console/cachePrune.js.map +1 -0
- package/dist/console/contract.d.ts +64 -0
- package/dist/console/contract.d.ts.map +1 -0
- package/dist/console/contract.js +32 -0
- package/dist/console/contract.js.map +1 -0
- package/dist/console/index.d.ts +25 -0
- package/dist/console/index.d.ts.map +1 -0
- package/dist/console/index.js +38 -0
- package/dist/console/index.js.map +1 -0
- package/dist/console/store.d.ts +14 -0
- package/dist/console/store.d.ts.map +1 -0
- package/dist/console/store.js +35 -0
- package/dist/console/store.js.map +1 -0
- package/dist/drivers/MemoryDriver.d.ts +37 -1
- package/dist/drivers/MemoryDriver.d.ts.map +1 -1
- package/dist/drivers/MemoryDriver.js +170 -72
- package/dist/drivers/MemoryDriver.js.map +1 -1
- package/dist/drivers/RedisDriver.d.ts +15 -8
- package/dist/drivers/RedisDriver.d.ts.map +1 -1
- package/dist/drivers/RedisDriver.js +198 -97
- package/dist/drivers/RedisDriver.js.map +1 -1
- package/dist/drivers/TieredDriver.d.ts +42 -0
- package/dist/drivers/TieredDriver.d.ts.map +1 -1
- package/dist/drivers/TieredDriver.js +114 -9
- package/dist/drivers/TieredDriver.js.map +1 -1
- package/dist/duration.d.ts +13 -3
- package/dist/duration.d.ts.map +1 -1
- package/dist/duration.js +22 -7
- package/dist/duration.js.map +1 -1
- package/dist/errors.d.ts +60 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +81 -6
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/quasar.d.ts +1 -1
- package/dist/quasar.d.ts.map +1 -1
- package/dist/quasar.js +106 -19
- package/dist/quasar.js.map +1 -1
- package/dist/services/main.d.ts +1 -1
- package/dist/services/main.d.ts.map +1 -1
- package/dist/services/main.js +22 -5
- package/dist/services/main.js.map +1 -1
- package/dist/types.d.ts +44 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/vendor/quasarConnection.d.ts +44 -3
- package/dist/vendor/quasarConnection.d.ts.map +1 -1
- package/dist/vendor/quasarConnection.js +64 -23
- package/dist/vendor/quasarConnection.js.map +1 -1
- package/package.json +5 -1
- package/src/CacheManager.ts +367 -69
- package/src/EchoProvider.ts +45 -4
- package/src/StoreManager.ts +131 -35
- package/src/bytes.ts +38 -0
- package/src/claim.ts +22 -0
- package/src/configure.ts +4 -0
- package/src/console/cacheClear.ts +96 -0
- package/src/console/cacheDelete.ts +65 -0
- package/src/console/cachePrune.ts +57 -0
- package/src/console/contract.ts +93 -0
- package/src/console/index.ts +61 -0
- package/src/console/store.ts +47 -0
- package/src/drivers/MemoryDriver.ts +221 -69
- package/src/drivers/RedisDriver.ts +234 -104
- package/src/drivers/TieredDriver.ts +169 -9
- package/src/duration.ts +28 -7
- package/src/errors.ts +103 -6
- package/src/index.ts +17 -3
- package/src/quasar.ts +145 -30
- package/src/services/main.ts +26 -8
- package/src/types.ts +46 -7
- package/src/vendor/quasarConnection.ts +105 -22
|
@@ -3,48 +3,98 @@
|
|
|
3
3
|
* and tag support. Suitable for development and single-process deployments, and
|
|
4
4
|
* as the L1 tier of {@link TieredDriver}.
|
|
5
5
|
*/
|
|
6
|
+
import { parseBytes } from "../bytes.js";
|
|
7
|
+
import { claimed, hasUnref } from "../claim.js";
|
|
8
|
+
import { checkTtlSeconds } from "../duration.js";
|
|
9
|
+
import { EchoError, UndefinedValueError } from "../errors.js";
|
|
10
|
+
/** The JSON a value is stored as; refused when JSON cannot carry it. */
|
|
11
|
+
function toJson(value) {
|
|
12
|
+
const json = JSON.stringify(value);
|
|
13
|
+
if (json === undefined) {
|
|
14
|
+
throw new EchoError("E_ECHO_UNSERIALIZABLE_VALUE", "Echo: the memory driver stores values as JSON, and this one has no JSON form — pass `serialize: false` to keep it as is");
|
|
15
|
+
}
|
|
16
|
+
return json;
|
|
17
|
+
}
|
|
6
18
|
export class MemoryDriver {
|
|
7
19
|
#store = new Map();
|
|
8
20
|
#tagIndex = new Map();
|
|
9
21
|
#sweepInterval;
|
|
10
22
|
/**
|
|
11
|
-
* How many entries this driver holds before it
|
|
23
|
+
* How many entries this driver holds before it evicts.
|
|
12
24
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* genuinely wants no ceiling.
|
|
25
|
+
* 1000 unless told otherwise, as upstream's LRU. It had no ceiling by
|
|
26
|
+
* default, so a cache keyed by anything a user controls — an id, a search
|
|
27
|
+
* term — grew until the process ran out of memory. `0` is an explicit "no
|
|
28
|
+
* ceiling".
|
|
18
29
|
*/
|
|
19
30
|
#maxItems;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
/** Byte bound on all values together; `0` for none. */
|
|
32
|
+
#maxSize;
|
|
33
|
+
/** Byte bound on one value; `0` for none. */
|
|
34
|
+
#maxEntrySize;
|
|
35
|
+
/** Bytes held, kept in step with every write and removal. */
|
|
36
|
+
#size = 0;
|
|
37
|
+
/**
|
|
38
|
+
* Whether values go in as JSON and come out as a copy.
|
|
39
|
+
*
|
|
40
|
+
* On by default, as upstream serializes its L1 by default: the driver kept
|
|
41
|
+
* the caller's object and returned that same reference, so a request that
|
|
42
|
+
* mutated what it read — a cached permission set, say — changed it for
|
|
43
|
+
* every later reader. JSON is also what the Redis driver stores, so a
|
|
44
|
+
* value reads back the same in development and in production.
|
|
45
|
+
*/
|
|
46
|
+
#serialize;
|
|
47
|
+
/**
|
|
48
|
+
* @param options the options, or the sweep interval in milliseconds (the
|
|
49
|
+
* original positional form, kept with `maxItems` beside it).
|
|
50
|
+
*/
|
|
51
|
+
constructor(options = {}, maxItems) {
|
|
52
|
+
const config = typeof options === "number"
|
|
53
|
+
? { sweepIntervalMs: options, maxItems }
|
|
54
|
+
: options;
|
|
55
|
+
const ceiling = config.maxItems ?? 1000;
|
|
56
|
+
if (Number.isNaN(ceiling) || ceiling < 0) {
|
|
57
|
+
throw new EchoError("E_ECHO_INVALID_CONFIG", `Echo: maxItems must be a count, 0 or Infinity for no ceiling — got ${String(ceiling)}`);
|
|
58
|
+
}
|
|
59
|
+
this.#maxItems = Number.isFinite(ceiling) ? ceiling : 0;
|
|
60
|
+
this.#serialize = config.serialize ?? true;
|
|
61
|
+
if (!this.#serialize &&
|
|
62
|
+
(config.maxSize !== undefined || config.maxEntrySize !== undefined)) {
|
|
63
|
+
// What it would measure is the JSON, and a driver keeping
|
|
64
|
+
// references has none. Upstream refuses the same combination.
|
|
65
|
+
throw new EchoError("E_ECHO_INVALID_CONFIG", "Echo: maxSize and maxEntrySize measure the stored JSON, so they need `serialize` — drop `serialize: false` or the byte bound");
|
|
26
66
|
}
|
|
67
|
+
this.#maxSize =
|
|
68
|
+
config.maxSize === undefined ? 0 : parseBytes(config.maxSize, "maxSize");
|
|
69
|
+
this.#maxEntrySize =
|
|
70
|
+
config.maxEntrySize === undefined
|
|
71
|
+
? this.#maxSize
|
|
72
|
+
: parseBytes(config.maxEntrySize, "maxEntrySize");
|
|
73
|
+
this.#sweepInterval = setInterval(() => this.#sweep(), config.sweepIntervalMs ?? 60_000);
|
|
74
|
+
// The sweep is housekeeping, not a reason for the process to stay up.
|
|
75
|
+
if (hasUnref(this.#sweepInterval))
|
|
76
|
+
this.#sweepInterval.unref();
|
|
77
|
+
}
|
|
78
|
+
#fits() {
|
|
79
|
+
return ((this.#maxItems === 0 || this.#store.size <= this.#maxItems) &&
|
|
80
|
+
(this.#maxSize === 0 || this.#size <= this.#maxSize));
|
|
27
81
|
}
|
|
28
82
|
/**
|
|
29
|
-
* Drop the
|
|
83
|
+
* Drop the least recently used entries until the store fits under its
|
|
84
|
+
* ceilings: the Map's order, since a read moves its key to the end as a
|
|
85
|
+
* write does.
|
|
30
86
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
87
|
+
* The least recently used, whatever has expired elsewhere in the order.
|
|
88
|
+
* Hunting for expired entries first walked the whole map on every write
|
|
89
|
+
* at the ceiling, a cost proportional to the ceiling a large working set
|
|
90
|
+
* pays on each write; expired entries are the sweep's, and a read drops
|
|
91
|
+
* one it finds. Upstream's LRU evicts the same way.
|
|
34
92
|
*/
|
|
35
93
|
#enforceCeiling() {
|
|
36
|
-
if (this.#
|
|
94
|
+
if (this.#fits())
|
|
37
95
|
return;
|
|
38
|
-
const now = Date.now();
|
|
39
96
|
for (const [key, entry] of this.#store) {
|
|
40
|
-
if (this.#
|
|
41
|
-
return;
|
|
42
|
-
if (entry.staleUntil > 0 && entry.staleUntil < now) {
|
|
43
|
-
this.#evict(key, entry);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
for (const [key, entry] of this.#store) {
|
|
47
|
-
if (this.#store.size <= this.#maxItems)
|
|
97
|
+
if (this.#fits())
|
|
48
98
|
return;
|
|
49
99
|
this.#evict(key, entry);
|
|
50
100
|
}
|
|
@@ -95,8 +145,20 @@ export class MemoryDriver {
|
|
|
95
145
|
this.#evict(key, entry);
|
|
96
146
|
return null;
|
|
97
147
|
}
|
|
148
|
+
// Least recently USED, not written: a read moves the key to the end of
|
|
149
|
+
// the eviction order. Without it the hottest key was the first to go.
|
|
150
|
+
this.#store.delete(key);
|
|
151
|
+
this.#store.set(key, entry);
|
|
98
152
|
const stale = entry.expiresAt > 0 && entry.expiresAt < now;
|
|
99
|
-
|
|
153
|
+
const value = this.#serialize && typeof entry.value === "string"
|
|
154
|
+
? JSON.parse(entry.value)
|
|
155
|
+
: entry.value;
|
|
156
|
+
return {
|
|
157
|
+
value: claimed(value),
|
|
158
|
+
stale,
|
|
159
|
+
expiresAt: entry.expiresAt,
|
|
160
|
+
tags: [...entry.tags],
|
|
161
|
+
};
|
|
100
162
|
}
|
|
101
163
|
/**
|
|
102
164
|
* Delete an entry AND scrub its tag-index refs. TTL/grace expiry (sweep +
|
|
@@ -105,24 +167,68 @@ export class MemoryDriver {
|
|
|
105
167
|
* into a wrong-purge under deleteByTag (audit 2026-06-13).
|
|
106
168
|
*/
|
|
107
169
|
#evict(key, entry) {
|
|
108
|
-
|
|
109
|
-
this.#tagIndex.get(tag)?.delete(key);
|
|
170
|
+
this.#untag(key, entry.tags);
|
|
110
171
|
this.#store.delete(key);
|
|
172
|
+
this.#size -= entry.size;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Take `key` out of each tag's set, and drop a set it leaves empty.
|
|
176
|
+
*
|
|
177
|
+
* Emptied sets were kept, so per-user or per-id tags grew the index by one
|
|
178
|
+
* set per entry ever written: a store capped at ten entries held hundreds
|
|
179
|
+
* of megabytes of empty sets.
|
|
180
|
+
*/
|
|
181
|
+
#untag(key, tags) {
|
|
182
|
+
for (const tag of tags) {
|
|
183
|
+
const keys = this.#tagIndex.get(tag);
|
|
184
|
+
if (keys === undefined)
|
|
185
|
+
continue;
|
|
186
|
+
keys.delete(key);
|
|
187
|
+
if (keys.size === 0)
|
|
188
|
+
this.#tagIndex.delete(tag);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/** How many tags the index holds — what bounds its memory, for diagnostics. */
|
|
192
|
+
tagCount() {
|
|
193
|
+
return this.#tagIndex.size;
|
|
111
194
|
}
|
|
112
195
|
#write(key, value, ttlSeconds, graceSeconds, tags, expiresAtOverride) {
|
|
113
196
|
if (value === null || value === undefined) {
|
|
114
|
-
throw new
|
|
197
|
+
throw new UndefinedValueError();
|
|
198
|
+
}
|
|
199
|
+
// Before anything is touched: a value JSON cannot carry must leave the
|
|
200
|
+
// previous entry and its tags exactly as they were.
|
|
201
|
+
const stored = this.#serialize ? toJson(value) : value;
|
|
202
|
+
const size = typeof stored === "string" ? Buffer.byteLength(stored) : 0;
|
|
203
|
+
if ((this.#maxEntrySize > 0 && size > this.#maxEntrySize) ||
|
|
204
|
+
(this.#maxSize > 0 && size > this.#maxSize)) {
|
|
205
|
+
// Too big to keep. The previous value goes too, as upstream's LRU
|
|
206
|
+
// does: a skipped write must not leave an older value served. A
|
|
207
|
+
// value over the whole store's bound counts as too big whatever
|
|
208
|
+
// maxEntrySize says: inserted, it evicted every other entry and
|
|
209
|
+
// then itself.
|
|
210
|
+
this.#deleteEntry(key);
|
|
211
|
+
return;
|
|
115
212
|
}
|
|
116
213
|
const now = Date.now();
|
|
117
|
-
const
|
|
214
|
+
const ttl = ttlSeconds === undefined ? 0 : checkTtlSeconds(ttlSeconds);
|
|
215
|
+
const graceMs = graceSeconds > 0 ? graceSeconds * 1000 : 0;
|
|
216
|
+
if (expiresAtOverride === undefined && ttl < 0 && graceMs === 0) {
|
|
217
|
+
// Already expired, and no grace to keep a stale copy for: nothing
|
|
218
|
+
// to store, and the previous value must not survive it.
|
|
219
|
+
this.#deleteEntry(key);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
118
222
|
// An absolute `expiresAtOverride` (e.g. `expire()` marking stale-now) wins
|
|
119
|
-
// over the ttl-derived expiry; a past value makes the entry immediately
|
|
223
|
+
// over the ttl-derived expiry; a past value makes the entry immediately
|
|
224
|
+
// stale. So does a negative TTL — it never reads as "no expiry".
|
|
120
225
|
const expiresAt = expiresAtOverride !== undefined
|
|
121
226
|
? expiresAtOverride
|
|
122
|
-
:
|
|
123
|
-
? now
|
|
124
|
-
: 0
|
|
125
|
-
|
|
227
|
+
: ttl < 0
|
|
228
|
+
? now - 1
|
|
229
|
+
: ttl > 0
|
|
230
|
+
? now + ttl * 1000
|
|
231
|
+
: 0;
|
|
126
232
|
// A never-expiring entry never goes stale either; otherwise grace extends
|
|
127
233
|
// physical retention past the logical expiry. Measure grace from the LATER
|
|
128
234
|
// of the expiry and now, so an already-past expiry still survives its grace.
|
|
@@ -131,16 +237,21 @@ export class MemoryDriver {
|
|
|
131
237
|
// its old tag-index refs, or a later deleteByTag could purge this fresh
|
|
132
238
|
// value (audit 2026-05-22 F3).
|
|
133
239
|
const prev = this.#store.get(key);
|
|
134
|
-
if (prev !== undefined)
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
240
|
+
if (prev !== undefined)
|
|
241
|
+
this.#evict(key, prev);
|
|
242
|
+
// Inserted last, so it is the most recently used.
|
|
243
|
+
this.#store.set(key, {
|
|
244
|
+
value: stored,
|
|
245
|
+
expiresAt,
|
|
246
|
+
staleUntil,
|
|
247
|
+
tags,
|
|
248
|
+
size,
|
|
249
|
+
});
|
|
250
|
+
this.#size += size;
|
|
251
|
+
// Indexed BEFORE the ceiling is enforced, so an eviction that takes
|
|
252
|
+
// this very entry untags it. Indexed after, an entry the ceiling had
|
|
253
|
+
// just dropped stayed in its tags' sets, and a later deleteByTag of
|
|
254
|
+
// one of them purged whatever value the key held by then.
|
|
144
255
|
for (const tag of tags) {
|
|
145
256
|
let set = this.#tagIndex.get(tag);
|
|
146
257
|
if (!set) {
|
|
@@ -149,6 +260,7 @@ export class MemoryDriver {
|
|
|
149
260
|
}
|
|
150
261
|
set.add(key);
|
|
151
262
|
}
|
|
263
|
+
this.#enforceCeiling();
|
|
152
264
|
}
|
|
153
265
|
async set(key, value, ttlSeconds) {
|
|
154
266
|
this.#write(key, value, ttlSeconds, 0, []);
|
|
@@ -157,32 +269,25 @@ export class MemoryDriver {
|
|
|
157
269
|
this.#write(key, value, options.ttlSeconds, options.graceSeconds ?? 0, options.tags ?? [], options.expiresAt);
|
|
158
270
|
}
|
|
159
271
|
async delete(key) {
|
|
272
|
+
return this.#deleteEntry(key);
|
|
273
|
+
}
|
|
274
|
+
#deleteEntry(key) {
|
|
160
275
|
const entry = this.#store.get(key);
|
|
161
|
-
if (entry)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
return this.#store.delete(key);
|
|
276
|
+
if (entry === undefined)
|
|
277
|
+
return false;
|
|
278
|
+
this.#evict(key, entry);
|
|
279
|
+
return true;
|
|
167
280
|
}
|
|
168
281
|
async flush(prefix) {
|
|
169
282
|
if (prefix === undefined) {
|
|
170
283
|
this.#store.clear();
|
|
171
284
|
this.#tagIndex.clear();
|
|
285
|
+
this.#size = 0;
|
|
172
286
|
return;
|
|
173
287
|
}
|
|
174
|
-
for (const key of [...this.#store
|
|
288
|
+
for (const [key, entry] of [...this.#store]) {
|
|
175
289
|
if (key.startsWith(prefix))
|
|
176
|
-
this.#
|
|
177
|
-
}
|
|
178
|
-
// The tag index points at keys; the ones that are gone go with them.
|
|
179
|
-
for (const [tag, keys] of [...this.#tagIndex.entries()]) {
|
|
180
|
-
for (const key of [...keys]) {
|
|
181
|
-
if (key.startsWith(prefix))
|
|
182
|
-
keys.delete(key);
|
|
183
|
-
}
|
|
184
|
-
if (keys.size === 0)
|
|
185
|
-
this.#tagIndex.delete(tag);
|
|
290
|
+
this.#evict(key, entry);
|
|
186
291
|
}
|
|
187
292
|
}
|
|
188
293
|
async has(key) {
|
|
@@ -205,15 +310,8 @@ export class MemoryDriver {
|
|
|
205
310
|
toDelete.add(key);
|
|
206
311
|
}
|
|
207
312
|
}
|
|
208
|
-
for (const key of toDelete)
|
|
209
|
-
|
|
210
|
-
if (entry) {
|
|
211
|
-
for (const t of entry.tags) {
|
|
212
|
-
this.#tagIndex.get(t)?.delete(key);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
this.#store.delete(key);
|
|
216
|
-
}
|
|
313
|
+
for (const key of toDelete)
|
|
314
|
+
this.#deleteEntry(key);
|
|
217
315
|
for (const tag of tags)
|
|
218
316
|
this.#tagIndex.delete(tag);
|
|
219
317
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryDriver.js","sourceRoot":"","sources":["../../src/drivers/MemoryDriver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"MemoryDriver.js","sourceRoot":"","sources":["../../src/drivers/MemoryDriver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA8C9D,wEAAwE;AACxE,SAAS,MAAM,CAAC,KAAc;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,SAA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CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACnD,KAAK,MAAM,GAAG,IAAI,IAAI;YAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAED,gDAAgD;IAChD,KAAK,CAAC,SAAS,CAAC,IAAc;QAC7B,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACD"}
|
|
@@ -3,26 +3,33 @@
|
|
|
3
3
|
* (stale-while-revalidate) and tags. Suitable as the L2 tier of
|
|
4
4
|
* {@link TieredDriver}.
|
|
5
5
|
*
|
|
6
|
-
* Requires a Redis client
|
|
7
|
-
*
|
|
6
|
+
* Requires a Redis client implementing the minimal interface below, which a
|
|
7
|
+
* raw ioredis client satisfies.
|
|
8
8
|
*
|
|
9
|
-
* STORAGE FORMAT
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* STORAGE FORMAT: values live at `<prefix>v:<key>` as a JSON envelope
|
|
10
|
+
* `{ "v": <value>, "e": <logicalExpiryEpochMs> }`; tag sets at `<prefix>t:<tag>`
|
|
11
|
+
* and per-key reverse indexes at `<prefix>m:<key>`. The physical Redis TTL
|
|
12
|
+
* covers `ttl + grace` so a logically-expired value survives for the grace
|
|
13
|
+
* window; `e` records the logical expiry so reads can flag it stale.
|
|
13
14
|
*/
|
|
14
15
|
import type { CacheEntry, DriverSetOptions, TaggableDriver } from "../types.js";
|
|
15
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Minimal Redis client interface, in ioredis' shape — a raw ioredis client
|
|
18
|
+
* satisfies it as is.
|
|
19
|
+
*/
|
|
16
20
|
export interface RedisClient {
|
|
17
21
|
get(key: string): Promise<string | null>;
|
|
18
22
|
set(key: string, value: string, ...args: unknown[]): Promise<unknown>;
|
|
19
|
-
|
|
23
|
+
/** Variadic, as ioredis declares it: a raw client then typechecks. */
|
|
24
|
+
del(...keys: string[]): Promise<number>;
|
|
20
25
|
exists(key: string): Promise<number>;
|
|
21
26
|
keys(pattern: string): Promise<string[]>;
|
|
22
27
|
sadd(key: string, ...members: string[]): Promise<number>;
|
|
23
28
|
srem(key: string, ...members: string[]): Promise<number>;
|
|
24
29
|
smembers(key: string): Promise<string[]>;
|
|
25
30
|
expire(key: string, seconds: number): Promise<number>;
|
|
31
|
+
/** Drop a key's expiry, so a tag set outlives no less than an immortal member. */
|
|
32
|
+
persist(key: string): Promise<number>;
|
|
26
33
|
ttl(key: string): Promise<number>;
|
|
27
34
|
scan?(cursor: string, matchOption: "MATCH", pattern: string, countOption: "COUNT", count: number): Promise<[string, string[]]>;
|
|
28
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisDriver.d.ts","sourceRoot":"","sources":["../../src/drivers/RedisDriver.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"RedisDriver.d.ts","sourceRoot":"","sources":["../../src/drivers/RedisDriver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGhF;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE,sEAAsE;IACtE,GAAG,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAA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