@gantryland/task-cache 0.1.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.md ADDED
@@ -0,0 +1,85 @@
1
+ # Task Cache
2
+
3
+ Cache combinator for Task. Skip fetches when data is fresh.
4
+
5
+ Works in browser and Node.js with no dependencies.
6
+
7
+ ## Quick start
8
+
9
+ ```typescript
10
+ import { CacheStore, cached } from "@gantryland/task-cache";
11
+ import { Task } from "@gantryland/task";
12
+ import { pipe } from "@gantryland/task-combinators";
13
+
14
+ const cache = new CacheStore();
15
+
16
+ const task = new Task(
17
+ pipe(
18
+ () => fetch("/api/users").then((r) => r.json()),
19
+ cached("users", cache, 60_000) // skip fetch if cached within 1 min
20
+ )
21
+ );
22
+
23
+ await task.run(); // fetches
24
+ await task.run(); // cache hit, no fetch
25
+
26
+ cache.invalidate("users");
27
+ await task.run(); // fetches again
28
+ ```
29
+
30
+ ## API
31
+
32
+ ### CacheStore
33
+
34
+ ```typescript
35
+ const cache = new CacheStore();
36
+
37
+ cache.get<T>(key, maxAge?): T | undefined
38
+ cache.set(key, data): void
39
+ cache.has(key, maxAge?): boolean
40
+ cache.invalidate(key?): void // no key = clear all
41
+ ```
42
+
43
+ ### cached combinator
44
+
45
+ ```typescript
46
+ cached<T>(key: string, store: CacheStore, maxAge?: number)
47
+ ```
48
+
49
+ Wraps a TaskFn. Returns cached data if fresh, otherwise fetches and caches.
50
+
51
+ ## Patterns
52
+
53
+ ### Shared cache across tasks
54
+
55
+ ```typescript
56
+ import { pipe, map } from "@gantryland/task-combinators";
57
+
58
+ const cache = new CacheStore();
59
+
60
+ const usersTask = new Task(pipe(fetchUsers, cached("users", cache)));
61
+ const activeUsersTask = new Task(
62
+ pipe(fetchUsers, cached("users", cache), map(u => u.filter(x => x.active)))
63
+ );
64
+ // Both hit the same cache entry
65
+ ```
66
+
67
+ ### Invalidate on mutation
68
+
69
+ ```typescript
70
+ async function deleteUser(id: string) {
71
+ await api.deleteUser(id);
72
+ cache.invalidate("users");
73
+ await usersTask.run();
74
+ }
75
+ ```
76
+
77
+ ### TTL-based freshness
78
+
79
+ ```typescript
80
+ // Cache for 5 minutes
81
+ cached("users", cache, 5 * 60 * 1000)
82
+
83
+ // Cache forever (until manual invalidation)
84
+ cached("users", cache)
85
+ ```
@@ -0,0 +1,112 @@
1
+ import type { TaskFn } from "@gantryland/task";
2
+ /**
3
+ * Simple key-value cache with optional TTL support.
4
+ *
5
+ * Stores data with timestamps for time-based expiration. Use with the
6
+ * `cached` combinator to memoize TaskFn results.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const cache = new CacheStore();
11
+ *
12
+ * cache.set('users', [{ id: 1, name: 'Alice' }]);
13
+ * cache.get('users'); // [{ id: 1, name: 'Alice' }]
14
+ * cache.get('users', 60_000); // same, if within 1 minute
15
+ *
16
+ * cache.invalidate('users'); // remove one
17
+ * cache.invalidate(); // clear all
18
+ * ```
19
+ */
20
+ export declare class CacheStore {
21
+ private store;
22
+ /**
23
+ * Retrieves cached data by key. Returns undefined if not found or expired.
24
+ *
25
+ * @template T - The expected type of the cached data
26
+ * @param key - The cache key
27
+ * @param maxAge - Optional TTL in milliseconds. If provided and the entry
28
+ * is older than maxAge, it is deleted and undefined is returned.
29
+ * @returns The cached data or undefined
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * cache.get<User[]>('users'); // cached forever
34
+ * cache.get<User[]>('users', 60_000); // only if cached within 1 min
35
+ * ```
36
+ */
37
+ get<T>(key: string, maxAge?: number): T | undefined;
38
+ /**
39
+ * Stores data with the current timestamp.
40
+ *
41
+ * @param key - The cache key
42
+ * @param data - The data to cache
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * cache.set('users', users);
47
+ * ```
48
+ */
49
+ set(key: string, data: unknown): void;
50
+ /**
51
+ * Checks if a key exists and is not expired.
52
+ *
53
+ * @param key - The cache key
54
+ * @param maxAge - Optional TTL in milliseconds
55
+ * @returns True if the key exists and is fresh
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * if (!cache.has('users', 60_000)) {
60
+ * await fetchUsers();
61
+ * }
62
+ * ```
63
+ */
64
+ has(key: string, maxAge?: number): boolean;
65
+ /**
66
+ * Invalidates cached data. Pass a key to remove one entry, or no
67
+ * arguments to clear the entire cache.
68
+ *
69
+ * @param key - Optional key to invalidate. If omitted, clears all.
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * cache.invalidate('users'); // remove one
74
+ * cache.invalidate(); // clear all
75
+ * ```
76
+ */
77
+ invalidate(key?: string): void;
78
+ }
79
+ /**
80
+ * Cache combinator for TaskFn. Returns cached data if fresh, otherwise
81
+ * executes the TaskFn and caches the result.
82
+ *
83
+ * @template T - The type of the resolved data
84
+ * @param key - The cache key
85
+ * @param store - The CacheStore instance
86
+ * @param maxAge - Optional TTL in milliseconds. If omitted, cached forever
87
+ * (until manual invalidation).
88
+ * @returns A combinator that wraps a TaskFn with caching
89
+ *
90
+ * @example
91
+ * ```typescript
92
+ * import { pipe } from '../task-combinators';
93
+ * import { Task } from '../task';
94
+ *
95
+ * const cache = new CacheStore();
96
+ *
97
+ * const task = new Task(
98
+ * pipe(
99
+ * (signal) => fetch('/api/users', { signal }).then(r => r.json()),
100
+ * cached('users', cache, 60_000) // cache for 1 minute
101
+ * )
102
+ * );
103
+ *
104
+ * await task.run(); // fetches
105
+ * await task.run(); // cache hit, no fetch
106
+ *
107
+ * cache.invalidate('users');
108
+ * await task.run(); // fetches again
109
+ * ```
110
+ */
111
+ export declare const cached: <T>(key: string, store: CacheStore, maxAge?: number) => (taskFn: TaskFn<T>) => TaskFn<T>;
112
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,KAAK,CAAsD;IAEnE;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAUnD;;;;;;;;;;OAUG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI;IAIrC;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO;IAI1C;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;CAO/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,MAAM,GAChB,CAAC,EAAE,KAAK,MAAM,EAAE,OAAO,UAAU,EAAE,SAAS,MAAM,MAClD,QAAQ,MAAM,CAAC,CAAC,CAAC,KAAG,MAAM,CAAC,CAAC,CAQ5B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Simple key-value cache with optional TTL support.
3
+ *
4
+ * Stores data with timestamps for time-based expiration. Use with the
5
+ * `cached` combinator to memoize TaskFn results.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * const cache = new CacheStore();
10
+ *
11
+ * cache.set('users', [{ id: 1, name: 'Alice' }]);
12
+ * cache.get('users'); // [{ id: 1, name: 'Alice' }]
13
+ * cache.get('users', 60_000); // same, if within 1 minute
14
+ *
15
+ * cache.invalidate('users'); // remove one
16
+ * cache.invalidate(); // clear all
17
+ * ```
18
+ */
19
+ export class CacheStore {
20
+ constructor() {
21
+ this.store = new Map();
22
+ }
23
+ /**
24
+ * Retrieves cached data by key. Returns undefined if not found or expired.
25
+ *
26
+ * @template T - The expected type of the cached data
27
+ * @param key - The cache key
28
+ * @param maxAge - Optional TTL in milliseconds. If provided and the entry
29
+ * is older than maxAge, it is deleted and undefined is returned.
30
+ * @returns The cached data or undefined
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * cache.get<User[]>('users'); // cached forever
35
+ * cache.get<User[]>('users', 60_000); // only if cached within 1 min
36
+ * ```
37
+ */
38
+ get(key, maxAge) {
39
+ const entry = this.store.get(key);
40
+ if (!entry)
41
+ return undefined;
42
+ if (maxAge && Date.now() - entry.time > maxAge) {
43
+ this.store.delete(key);
44
+ return undefined;
45
+ }
46
+ return entry.data;
47
+ }
48
+ /**
49
+ * Stores data with the current timestamp.
50
+ *
51
+ * @param key - The cache key
52
+ * @param data - The data to cache
53
+ *
54
+ * @example
55
+ * ```typescript
56
+ * cache.set('users', users);
57
+ * ```
58
+ */
59
+ set(key, data) {
60
+ this.store.set(key, { data, time: Date.now() });
61
+ }
62
+ /**
63
+ * Checks if a key exists and is not expired.
64
+ *
65
+ * @param key - The cache key
66
+ * @param maxAge - Optional TTL in milliseconds
67
+ * @returns True if the key exists and is fresh
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * if (!cache.has('users', 60_000)) {
72
+ * await fetchUsers();
73
+ * }
74
+ * ```
75
+ */
76
+ has(key, maxAge) {
77
+ return this.get(key, maxAge) !== undefined;
78
+ }
79
+ /**
80
+ * Invalidates cached data. Pass a key to remove one entry, or no
81
+ * arguments to clear the entire cache.
82
+ *
83
+ * @param key - Optional key to invalidate. If omitted, clears all.
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * cache.invalidate('users'); // remove one
88
+ * cache.invalidate(); // clear all
89
+ * ```
90
+ */
91
+ invalidate(key) {
92
+ if (key) {
93
+ this.store.delete(key);
94
+ }
95
+ else {
96
+ this.store.clear();
97
+ }
98
+ }
99
+ }
100
+ /**
101
+ * Cache combinator for TaskFn. Returns cached data if fresh, otherwise
102
+ * executes the TaskFn and caches the result.
103
+ *
104
+ * @template T - The type of the resolved data
105
+ * @param key - The cache key
106
+ * @param store - The CacheStore instance
107
+ * @param maxAge - Optional TTL in milliseconds. If omitted, cached forever
108
+ * (until manual invalidation).
109
+ * @returns A combinator that wraps a TaskFn with caching
110
+ *
111
+ * @example
112
+ * ```typescript
113
+ * import { pipe } from '../task-combinators';
114
+ * import { Task } from '../task';
115
+ *
116
+ * const cache = new CacheStore();
117
+ *
118
+ * const task = new Task(
119
+ * pipe(
120
+ * (signal) => fetch('/api/users', { signal }).then(r => r.json()),
121
+ * cached('users', cache, 60_000) // cache for 1 minute
122
+ * )
123
+ * );
124
+ *
125
+ * await task.run(); // fetches
126
+ * await task.run(); // cache hit, no fetch
127
+ *
128
+ * cache.invalidate('users');
129
+ * await task.run(); // fetches again
130
+ * ```
131
+ */
132
+ export const cached = (key, store, maxAge) => (taskFn) => async (signal) => {
133
+ const hit = store.get(key, maxAge);
134
+ if (hit !== undefined)
135
+ return hit;
136
+ const result = await taskFn(signal);
137
+ store.set(key, result);
138
+ return result;
139
+ };
140
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,UAAU;IAAvB;QACU,UAAK,GAAG,IAAI,GAAG,EAA2C,CAAC;IA+ErE,CAAC;IA7EC;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAI,GAAW,EAAE,MAAe;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,CAAC;QAC7B,IAAI,MAAM,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,IAAI,GAAG,MAAM,EAAE,CAAC;YAC/C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACvB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,KAAK,CAAC,IAAS,CAAC;IACzB,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,GAAW,EAAE,IAAa;QAC5B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,GAAW,EAAE,MAAe;QAC9B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,SAAS,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,GAAY;QACrB,IAAI,GAAG,EAAE,CAAC;YACR,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,MAAM,GACjB,CAAI,GAAW,EAAE,KAAiB,EAAE,MAAe,EAAE,EAAE,CACvD,CAAC,MAAiB,EAAa,EAAE,CACjC,KAAK,EAAE,MAAoB,EAAE,EAAE;IAC7B,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;IACtC,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,GAAG,CAAC;IAElC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACvB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/typescript/lib/lib.es2020.full.d.ts","../../task/dist/index.d.ts","../index.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/react/index.d.ts"],"fileIdsList":[[54,55,56],[52]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"1305d1e76ca44e30fb8b2b8075fa522b83f60c0bcf5d4326a9d2cf79b53724f8","impliedFormat":1},{"version":"b6408a1c1d3ad320eaa8b7bc9a25001f56d37c742ded4c4184e3da5ce88a432f","impliedFormat":99},{"version":"e8a85ae8feff565757581a5fad4f5b1f53035ea26d8f6b6dd03fd6adb6cac033","signature":"c22c5ba7c92a6ad30c5e363a3aba02b520de961b830d96452a7ea3a18f2691b2","impliedFormat":99},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"7a3aa194cfd5919c4da251ef04ea051077e22702638d4edcb9579e9101653519","affectsGlobalScope":true,"impliedFormat":1}],"root":[53],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":199,"outDir":"./","rootDir":"..","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7},"referencedMap":[[57,1],[53,2]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@gantryland/task-cache",
3
+ "version": "0.1.0",
4
+ "description": "Cache store and combinator for @gantryland/task",
5
+ "keywords": ["task", "cache", "memoize", "async"],
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": ["dist", "README.md"],
17
+ "sideEffects": false,
18
+ "license": "MIT",
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/joehoot/gantryland.git"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/joehoot/gantryland/issues"
28
+ },
29
+ "homepage": "https://github.com/joehoot/gantryland/tree/main/packages/task-cache#readme",
30
+ "dependencies": {
31
+ "@gantryland/task": "^0.1.0"
32
+ }
33
+ }