@maestro-js/cache 1.0.0-alpha.17 → 1.0.0-alpha.18
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/dist/index.d.ts +4 -3
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Log } from '@maestro-js/log';
|
|
2
2
|
import Redis$1, { Redis } from 'ioredis';
|
|
3
3
|
|
|
4
|
-
type DurationString = `${number} ${'day' | 'days' | 'hour' | 'hours' | 'minute' | 'minutes' | 'second' | 'seconds'}`;
|
|
5
|
-
|
|
6
4
|
/** Contract that every cache backend (Redis, MockRedis, etc.) must implement */
|
|
7
5
|
interface CacheDriver {
|
|
8
6
|
/** Checks whether `key` exists in the store */
|
|
@@ -62,6 +60,9 @@ declare function redisCacheDriver({ url, port, operationTimeout, connectTimeout,
|
|
|
62
60
|
connection: Redis$1;
|
|
63
61
|
};
|
|
64
62
|
|
|
63
|
+
type DurationString = `${number} ${'day' | 'days' | 'hour' | 'hours' | 'minute' | 'minutes' | 'second' | 'seconds'}`;
|
|
64
|
+
|
|
65
|
+
type CacheDurationString = DurationString;
|
|
65
66
|
/**
|
|
66
67
|
* Creates a new Cache service instance with the provided driver configuration.
|
|
67
68
|
*/
|
|
@@ -163,7 +164,7 @@ declare namespace Cache {
|
|
|
163
164
|
/** Pluggable backend implementation — see `Cache.drivers` for built-in options */
|
|
164
165
|
type Driver = CacheDriver;
|
|
165
166
|
/** Duration string like `'5 minutes'` or `'1 hour'` */
|
|
166
|
-
type DurationString =
|
|
167
|
+
type DurationString = CacheDurationString;
|
|
167
168
|
/** TTL options for `remember` — a number (seconds), `null` (forever), a duration string, or an object with `ttl` and `swr` */
|
|
168
169
|
type RememberOptions = number | null | DurationString | {
|
|
169
170
|
ttl: number | DurationString | null;
|
package/package.json
CHANGED
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"ioredis-timeout": "^1.5.0",
|
|
14
14
|
"ioredis-mock": "^8.2.0",
|
|
15
15
|
"@types/ioredis-mock": "^8.2.6",
|
|
16
|
-
"@maestro-js/service-registry": "1.0.0-alpha.
|
|
16
|
+
"@maestro-js/service-registry": "1.0.0-alpha.18"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@maestro-js/log": "1.0.0-alpha.
|
|
19
|
+
"@maestro-js/log": "1.0.0-alpha.18"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^22.19.11",
|
|
23
|
-
"@maestro-js/log": "1.0.0-alpha.
|
|
23
|
+
"@maestro-js/log": "1.0.0-alpha.18"
|
|
24
24
|
},
|
|
25
|
-
"version": "1.0.0-alpha.
|
|
25
|
+
"version": "1.0.0-alpha.18",
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "restricted"
|
|
28
28
|
},
|