@matvdt/js-toolkit 0.0.1-canary.21 → 0.0.1-canary.22

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.
@@ -42,13 +42,13 @@ function withCache(collection, method, args, tags, fn) {
42
42
  return (0, import_cache.unstable_cache)(fn, cacheKey(collection, method, args), { tags })();
43
43
  }
44
44
  function revalidateCollection(collection) {
45
- (0, import_cache.revalidateTag)(`collection:${collection}`, "max");
45
+ (0, import_cache.revalidateTag)(`collection:${collection}`, { expire: 0 });
46
46
  }
47
47
  function revalidateDoc(collection, id) {
48
- (0, import_cache.revalidateTag)(`doc:${collection}:${id}`, "max");
48
+ (0, import_cache.revalidateTag)(`doc:${collection}:${id}`, { expire: 0 });
49
49
  }
50
50
  function revalidateGlobal(slug) {
51
- (0, import_cache.revalidateTag)(`global:${slug}`, "max");
51
+ (0, import_cache.revalidateTag)(`global:${slug}`, { expire: 0 });
52
52
  }
53
53
 
54
54
  // src/payload-cms/server/payload.ts
@@ -7,13 +7,13 @@ function withCache(collection, method, args, tags, fn) {
7
7
  return unstable_cache(fn, cacheKey(collection, method, args), { tags })();
8
8
  }
9
9
  function revalidateCollection(collection) {
10
- revalidateTag(`collection:${collection}`, "max");
10
+ revalidateTag(`collection:${collection}`, { expire: 0 });
11
11
  }
12
12
  function revalidateDoc(collection, id) {
13
- revalidateTag(`doc:${collection}:${id}`, "max");
13
+ revalidateTag(`doc:${collection}:${id}`, { expire: 0 });
14
14
  }
15
15
  function revalidateGlobal(slug) {
16
- revalidateTag(`global:${slug}`, "max");
16
+ revalidateTag(`global:${slug}`, { expire: 0 });
17
17
  }
18
18
 
19
19
  // src/payload-cms/server/payload.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matvdt/js-toolkit",
3
- "version": "0.0.1-canary.21",
3
+ "version": "0.0.1-canary.22",
4
4
  "description": "JS/TS toolkit",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",