@fluojs/cache-manager 1.0.4 → 2.0.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/README.ko.md +214 -19
- package/README.md +215 -20
- package/dist/decorators.js +2 -2
- package/dist/deferred-eviction.d.ts +13 -0
- package/dist/deferred-eviction.d.ts.map +1 -0
- package/dist/deferred-eviction.js +85 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/interceptor.d.ts.map +1 -1
- package/dist/interceptor.js +9 -41
- package/dist/module.d.ts +26 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +55 -9
- package/dist/operation-observer.d.ts +16 -0
- package/dist/operation-observer.d.ts.map +1 -0
- package/dist/operation-observer.js +61 -0
- package/dist/service.d.ts +22 -1
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +109 -25
- package/dist/status.js +1 -1
- package/dist/store-operation-scheduler.d.ts +28 -0
- package/dist/store-operation-scheduler.d.ts.map +1 -0
- package/dist/store-operation-scheduler.js +49 -0
- package/dist/stores/memory-store.d.ts.map +1 -1
- package/dist/stores/memory-store.js +5 -1
- package/dist/stores/redis-store.d.ts.map +1 -1
- package/dist/stores/redis-store.js +12 -7
- package/dist/ttl-jitter.d.ts +19 -0
- package/dist/ttl-jitter.d.ts.map +1 -0
- package/dist/ttl-jitter.js +72 -0
- package/dist/types.d.ts +84 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -28,11 +28,14 @@ function normalizeScanResponse(result) {
|
|
|
28
28
|
keys
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function normalizePositiveTtlMilliseconds(ttlSeconds) {
|
|
32
|
-
return Math.max(1, Math.ceil(ttlSeconds * 1000));
|
|
31
|
+
function normalizePositiveTtlMilliseconds(ttlSeconds, maximumTtlMilliseconds) {
|
|
32
|
+
return Math.min(maximumTtlMilliseconds, Math.max(1, Math.ceil(ttlSeconds * 1000)));
|
|
33
33
|
}
|
|
34
|
-
function normalizeRedisExpirySeconds(ttlSeconds) {
|
|
35
|
-
return Math.max(1, Math.ceil(ttlSeconds));
|
|
34
|
+
function normalizeRedisExpirySeconds(ttlSeconds, maximumTtlSeconds) {
|
|
35
|
+
return Math.min(maximumTtlSeconds, Math.max(1, Math.ceil(ttlSeconds)));
|
|
36
|
+
}
|
|
37
|
+
function escapeRedisGlobPattern(value) {
|
|
38
|
+
return value.replace(/[\\*?[\]]/g, '\\$&');
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
/**
|
|
@@ -72,9 +75,11 @@ export class RedisStore {
|
|
|
72
75
|
value
|
|
73
76
|
};
|
|
74
77
|
if (ttlSeconds > 0) {
|
|
75
|
-
const
|
|
78
|
+
const maximumTtlMilliseconds = Number.MAX_SAFE_INTEGER - now;
|
|
79
|
+
const ttlMilliseconds = normalizePositiveTtlMilliseconds(ttlSeconds, maximumTtlMilliseconds);
|
|
76
80
|
entry.expiresAt = now + ttlMilliseconds;
|
|
77
|
-
const
|
|
81
|
+
const maximumTtlSeconds = Math.floor(maximumTtlMilliseconds / 1000);
|
|
82
|
+
const ttlSecondsRounded = normalizeRedisExpirySeconds(ttlSeconds, maximumTtlSeconds);
|
|
78
83
|
await this.client.set(redisKey, JSON.stringify(entry), 'EX', ttlSecondsRounded);
|
|
79
84
|
this.trackOwnedKey(redisKey);
|
|
80
85
|
return;
|
|
@@ -105,7 +110,7 @@ export class RedisStore {
|
|
|
105
110
|
return;
|
|
106
111
|
}
|
|
107
112
|
let cursor = '0';
|
|
108
|
-
const pattern = `${this.keyPrefix}*`;
|
|
113
|
+
const pattern = `${escapeRedisGlobPattern(this.keyPrefix)}*`;
|
|
109
114
|
do {
|
|
110
115
|
const scanResult = normalizeScanResponse(await this.client.scan(cursor, 'MATCH', pattern, 'COUNT', this.scanCount));
|
|
111
116
|
cursor = scanResult.cursor;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CacheTtlJitterOptions, NormalizedCacheTtlJitterOptions } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Normalize opt-in TTL jitter configuration and reject ratios that cannot produce a usable spread.
|
|
4
|
+
*
|
|
5
|
+
* @param options Raw jitter configuration, or `undefined` when jitter stays disabled.
|
|
6
|
+
* @returns Normalized jitter configuration, or `undefined` when jitter stays disabled.
|
|
7
|
+
* @throws Error When the supplied value is not an options object or contains an invalid field.
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeCacheTtlJitterOptions(options: CacheTtlJitterOptions | undefined): NormalizedCacheTtlJitterOptions | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Apply opt-in jitter to an already-resolved positive cache TTL.
|
|
12
|
+
*
|
|
13
|
+
* @param ttlSeconds Resolved TTL in seconds, taken from a per-call override or the module default.
|
|
14
|
+
* @param jitter Normalized jitter configuration, or `undefined` when jitter stays disabled.
|
|
15
|
+
* @returns The TTL handed to the cache store, preserving `0` as a no-expiry write and returning a positive finite value within the selected directional bounds.
|
|
16
|
+
* @throws Error When the configured randomness source returns a value outside the finite `[0, 1]` range.
|
|
17
|
+
*/
|
|
18
|
+
export declare function applyCacheTtlJitter(ttlSeconds: number, jitter: NormalizedCacheTtlJitterOptions | undefined): number;
|
|
19
|
+
//# sourceMappingURL=ttl-jitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ttl-jitter.d.ts","sourceRoot":"","sources":["../src/ttl-jitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,qBAAqB,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAE7G;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,qBAAqB,GAAG,SAAS,GACzC,+BAA+B,GAAG,SAAS,CAgC7C;AA2BD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,+BAA+B,GAAG,SAAS,GAClD,MAAM,CAoBR"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalize opt-in TTL jitter configuration and reject ratios that cannot produce a usable spread.
|
|
3
|
+
*
|
|
4
|
+
* @param options Raw jitter configuration, or `undefined` when jitter stays disabled.
|
|
5
|
+
* @returns Normalized jitter configuration, or `undefined` when jitter stays disabled.
|
|
6
|
+
* @throws Error When the supplied value is not an options object or contains an invalid field.
|
|
7
|
+
*/
|
|
8
|
+
export function normalizeCacheTtlJitterOptions(options) {
|
|
9
|
+
if (options === undefined) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
if (typeof options !== 'object' || options === null || Array.isArray(options)) {
|
|
13
|
+
throw new Error('@fluojs/cache-manager ttlJitter must be an options object when provided.');
|
|
14
|
+
}
|
|
15
|
+
const ratio = options.ratio;
|
|
16
|
+
const mode = options.mode;
|
|
17
|
+
const random = options.random;
|
|
18
|
+
if (!Number.isFinite(ratio) || ratio <= 0 || ratio > 1) {
|
|
19
|
+
throw new Error('@fluojs/cache-manager ttlJitter.ratio must be a finite number greater than 0 and at most 1.');
|
|
20
|
+
}
|
|
21
|
+
const normalizedMode = mode ?? 'symmetric';
|
|
22
|
+
if (normalizedMode !== 'symmetric' && normalizedMode !== 'shorten' && normalizedMode !== 'lengthen') {
|
|
23
|
+
throw new Error("@fluojs/cache-manager ttlJitter.mode must be 'symmetric', 'shorten', or 'lengthen'.");
|
|
24
|
+
}
|
|
25
|
+
if (random !== undefined && typeof random !== 'function') {
|
|
26
|
+
throw new Error('@fluojs/cache-manager ttlJitter.random must be a function when provided.');
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
mode: normalizedMode,
|
|
30
|
+
random,
|
|
31
|
+
ratio
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function readUnitSample(random) {
|
|
35
|
+
const sample = (random ?? Math.random)();
|
|
36
|
+
if (!Number.isFinite(sample) || sample < 0 || sample > 1) {
|
|
37
|
+
throw new Error('@fluojs/cache-manager ttlJitter.random must return a finite number from 0 through 1.');
|
|
38
|
+
}
|
|
39
|
+
return sample;
|
|
40
|
+
}
|
|
41
|
+
function resolveJitterOffsetSeconds(mode, magnitudeSeconds, sample) {
|
|
42
|
+
switch (mode) {
|
|
43
|
+
case 'symmetric':
|
|
44
|
+
return magnitudeSeconds * (sample * 2 - 1);
|
|
45
|
+
case 'shorten':
|
|
46
|
+
return -magnitudeSeconds * sample;
|
|
47
|
+
case 'lengthen':
|
|
48
|
+
return magnitudeSeconds * sample;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Apply opt-in jitter to an already-resolved positive cache TTL.
|
|
54
|
+
*
|
|
55
|
+
* @param ttlSeconds Resolved TTL in seconds, taken from a per-call override or the module default.
|
|
56
|
+
* @param jitter Normalized jitter configuration, or `undefined` when jitter stays disabled.
|
|
57
|
+
* @returns The TTL handed to the cache store, preserving `0` as a no-expiry write and returning a positive finite value within the selected directional bounds.
|
|
58
|
+
* @throws Error When the configured randomness source returns a value outside the finite `[0, 1]` range.
|
|
59
|
+
*/
|
|
60
|
+
export function applyCacheTtlJitter(ttlSeconds, jitter) {
|
|
61
|
+
if (!jitter || ttlSeconds <= 0) {
|
|
62
|
+
return ttlSeconds;
|
|
63
|
+
}
|
|
64
|
+
const offsetSeconds = resolveJitterOffsetSeconds(jitter.mode, ttlSeconds * jitter.ratio, readUnitSample(jitter.random));
|
|
65
|
+
if (offsetSeconds <= -ttlSeconds) {
|
|
66
|
+
return Number.MIN_VALUE;
|
|
67
|
+
}
|
|
68
|
+
if (offsetSeconds > Number.MAX_VALUE - ttlSeconds) {
|
|
69
|
+
return Number.MAX_VALUE;
|
|
70
|
+
}
|
|
71
|
+
return ttlSeconds + offsetSeconds;
|
|
72
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AsyncModuleOptions } from '@fluojs/core';
|
|
1
2
|
import type { InterceptorContext } from '@fluojs/http';
|
|
2
3
|
type Awaitable<T> = T | Promise<T>;
|
|
3
4
|
/**
|
|
@@ -42,6 +43,59 @@ interface CacheModuleInternalOptions {
|
|
|
42
43
|
* Resolves the principal-scope suffix appended by built-in HTTP cache-key strategies.
|
|
43
44
|
*/
|
|
44
45
|
export type PrincipalScopeResolver = (context: InterceptorContext) => string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Direction applied to a positive cache TTL when opt-in jitter is configured.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* `'symmetric'` spreads a TTL within `[ttl - ttl * ratio, ttl + ttl * ratio]`,
|
|
51
|
+
* `'shorten'` only reduces the TTL, and `'lengthen'` only extends it.
|
|
52
|
+
*/
|
|
53
|
+
export type CacheTtlJitterMode = 'symmetric' | 'shorten' | 'lengthen';
|
|
54
|
+
/**
|
|
55
|
+
* Opt-in configuration that spreads positive cache TTL values so keys written together stop expiring together.
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* Jitter is applied once by `CacheService` before store handoff, so memory, Redis, and custom stores
|
|
59
|
+
* observe the same already-jittered TTL. It only spreads expiry times: it is not distributed locking,
|
|
60
|
+
* refresh-ahead caching, or cross-instance stampede coordination. `ttl: 0` (no expiry) and invalid TTL
|
|
61
|
+
* values keep their existing meanings and are never jittered.
|
|
62
|
+
*/
|
|
63
|
+
export interface CacheTtlJitterOptions {
|
|
64
|
+
/** Maximum fraction of the resolved TTL used as jitter. Must be greater than `0` and at most `1`. */
|
|
65
|
+
ratio: number;
|
|
66
|
+
/** Direction of the applied jitter. Defaults to `'symmetric'`. */
|
|
67
|
+
mode?: CacheTtlJitterMode;
|
|
68
|
+
/** Randomness source that must return a finite value in `[0, 1]`. Defaults to `Math.random`; invalid samples reject the write. */
|
|
69
|
+
random?: () => number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Privacy-safe observation payload emitted once per completed cache operation.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* The discriminated union couples read operations to `hit`, `miss`, or `error`
|
|
76
|
+
* and write, invalidation, and lifecycle operations to `success` or `error`.
|
|
77
|
+
* Observations intentionally exclude cache keys, cached values, loader results,
|
|
78
|
+
* and error objects so operational instrumentation cannot leak application data.
|
|
79
|
+
*/
|
|
80
|
+
export type CacheObservation = {
|
|
81
|
+
readonly durationMs: number;
|
|
82
|
+
readonly operation: 'get' | 'remember';
|
|
83
|
+
readonly outcome: 'hit' | 'miss' | 'error';
|
|
84
|
+
} | {
|
|
85
|
+
readonly durationMs: number;
|
|
86
|
+
readonly operation: 'set' | 'del' | 'reset' | 'close';
|
|
87
|
+
readonly outcome: 'success' | 'error';
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Opt-in observation hook for cache hit rate, latency, and error instrumentation.
|
|
91
|
+
*
|
|
92
|
+
* @remarks
|
|
93
|
+
* Observer failures are contained: a thrown error or rejected promise is
|
|
94
|
+
* swallowed and never changes the cache result the caller receives.
|
|
95
|
+
*/
|
|
96
|
+
export interface CacheObserver {
|
|
97
|
+
onCacheOperation(observation: CacheObservation): Awaitable<void>;
|
|
98
|
+
}
|
|
45
99
|
/**
|
|
46
100
|
* Public configuration options for `CacheModule.forRoot(...)`.
|
|
47
101
|
*/
|
|
@@ -50,8 +104,12 @@ export interface CacheModuleOptions extends CacheModuleInternalOptions {
|
|
|
50
104
|
global?: boolean;
|
|
51
105
|
store?: 'memory' | 'redis' | CacheStore;
|
|
52
106
|
ttl?: number;
|
|
107
|
+
/** Opt-in positive-TTL jitter applied before store handoff. Only omission or `undefined` disables jitter. */
|
|
108
|
+
ttlJitter?: CacheTtlJitterOptions;
|
|
53
109
|
httpKeyStrategy?: CacheKeyStrategy;
|
|
54
110
|
principalScopeResolver?: PrincipalScopeResolver;
|
|
111
|
+
/** Opt-in privacy-safe observer notified after each cache operation completes. */
|
|
112
|
+
observer?: CacheObserver;
|
|
55
113
|
}
|
|
56
114
|
/**
|
|
57
115
|
* Compatibility-only public type for normalized cache-module configuration after defaults are applied.
|
|
@@ -67,8 +125,34 @@ export interface NormalizedCacheModuleOptions {
|
|
|
67
125
|
redis?: RedisCacheOptions;
|
|
68
126
|
store: 'memory' | 'redis' | CacheStore;
|
|
69
127
|
ttl: number;
|
|
128
|
+
ttlJitter?: NormalizedCacheTtlJitterOptions;
|
|
70
129
|
httpKeyStrategy: CacheKeyStrategy;
|
|
71
130
|
principalScopeResolver: PrincipalScopeResolver | undefined;
|
|
131
|
+
/** Opt-in privacy-safe observer notified after each cache operation completes. */
|
|
132
|
+
observer?: CacheObserver;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Public configuration options for `CacheModule.forRootAsync(...)`.
|
|
136
|
+
*
|
|
137
|
+
* @remarks
|
|
138
|
+
* `useFactory` returns `CacheModuleOptions`, so applications can reuse prepared cache
|
|
139
|
+
* configuration values. `global` stays on the registration call because module visibility
|
|
140
|
+
* is decided when the module is defined, before the injected factory runs. A `global` value
|
|
141
|
+
* returned by `useFactory` is ignored.
|
|
142
|
+
*/
|
|
143
|
+
export type CacheAsyncModuleOptions = Omit<AsyncModuleOptions<CacheModuleOptions>, 'useFactory'> & Pick<CacheModuleOptions, 'global'> & {
|
|
144
|
+
useFactory: (...dependencies: never[]) => Awaitable<CacheModuleOptions>;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Normalized TTL jitter configuration after defaults are applied.
|
|
148
|
+
*
|
|
149
|
+
* @remarks
|
|
150
|
+
* Application configuration should use `CacheTtlJitterOptions` with `CacheModule.forRoot(...)`.
|
|
151
|
+
*/
|
|
152
|
+
export interface NormalizedCacheTtlJitterOptions {
|
|
153
|
+
mode: CacheTtlJitterMode;
|
|
154
|
+
random: (() => number) | undefined;
|
|
155
|
+
ratio: number;
|
|
72
156
|
}
|
|
73
157
|
/**
|
|
74
158
|
* Computes a cache key from the active interceptor context.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 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ACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,OAAO,KACX,SAAS,CAAC,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,iBAAiB,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,kBAAkB,KAAK,MAAM,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"memory-store",
|
|
11
11
|
"decorator"
|
|
12
12
|
],
|
|
13
|
-
"version": "
|
|
13
|
+
"version": "2.0.0",
|
|
14
14
|
"private": false,
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"repository": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"directory": "packages/cache-manager"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=
|
|
22
|
+
"node": ">=24.0.0 <27"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@fluojs/core": "^
|
|
41
|
-
"@fluojs/di": "^
|
|
42
|
-
"@fluojs/http": "^
|
|
43
|
-
"@fluojs/runtime": "^
|
|
40
|
+
"@fluojs/core": "^2.0.0",
|
|
41
|
+
"@fluojs/di": "^3.0.0",
|
|
42
|
+
"@fluojs/http": "^3.0.0",
|
|
43
|
+
"@fluojs/runtime": "^3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"ioredis": "^5.0.0",
|
|
47
|
-
"@fluojs/redis": "^
|
|
47
|
+
"@fluojs/redis": "^2.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependenciesMeta": {
|
|
50
50
|
"@fluojs/redis": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"vitest": "^
|
|
58
|
+
"vitest": "^4.1.11"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"prebuild": "node ../../tooling/scripts/clean-dist.mjs",
|