@voltro/cache 0.87.0 → 0.89.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/dist/Cache.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CacheStore as e } from "./CacheStore.js";
2
2
  import { Clock as t, Context as n, Deferred as r, Effect as i, HashMap as a, Layer as o, Metric as s, Option as c, SynchronizedRef as l } from "effect";
3
3
  import { CACHE_FENCE_RETENTION_MS as u } from "@voltro/kv/connection";
4
- //#region src/Cache.ts
4
+ // src/Cache.ts
5
5
  var d = () => ({
6
6
  hits: 0,
7
7
  stale: 0,
@@ -191,5 +191,4 @@ var d = () => ({
191
191
  }) }) {
192
192
  static layer = o.effect(p, p.make);
193
193
  };
194
- //#endregion
195
194
  export { p as Cache };
@@ -1,6 +1,5 @@
1
1
  import { Context as e } from "effect";
2
2
  import { CACHE_FENCE_RETENTION_MS as t } from "@voltro/kv/connection";
3
- //#region src/CacheStore.ts
3
+ // src/CacheStore.ts
4
4
  var n = class extends e.Service()("@voltro/CacheStore") {};
5
- //#endregion
6
5
  export { t as CACHE_FENCE_RETENTION_MS, n as CacheStore };
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var e = Object.defineProperty, t = (t, n) => {
3
3
  let r = {};
4
4
  for (var i in t) e(r, i, {
@@ -7,5 +7,4 @@ var e = Object.defineProperty, t = (t, n) => {
7
7
  });
8
8
  return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
9
  };
10
- //#endregion
11
10
  export { t as __exportAll };
@@ -1,7 +1,7 @@
1
1
  import { CacheStore as e } from "./CacheStore.js";
2
2
  import { Clock as t, Effect as n, HashMap as r, HashSet as i, Layer as a, Option as o, Ref as s } from "effect";
3
3
  import { CACHE_FENCE_RETENTION_MS as c } from "@voltro/kv/connection";
4
- //#region src/backendMemory.ts
4
+ // src/backendMemory.ts
5
5
  var l = {
6
6
  entries: r.empty(),
7
7
  tagIndex: r.empty(),
@@ -171,5 +171,4 @@ var l = {
171
171
  })))
172
172
  };
173
173
  }), x = (t = {}) => a.effect(e, b(t));
174
- //#endregion
175
174
  export { x as layerMemory };
@@ -2,7 +2,7 @@ import { CacheError as e } from "./errors.js";
2
2
  import { CacheStore as t } from "./CacheStore.js";
3
3
  import { Effect as n, Layer as r, Option as i } from "effect";
4
4
  import { CACHE_ATOMIC_SCRIPT as a, RedisConnections as o, cacheAtomicArray as s, cacheAtomicComponent as c, cacheAtomicKeys as l, cacheAtomicMember as u, cacheAtomicRoot as d, cacheAtomicScanPage as f, cacheAtomicSnapshot as p, cacheAtomicTtl as m, cacheAtomicValueSnapshots as h, decodeCacheAtomicCommand as g, decodeCacheAtomicReply as _ } from "@voltro/kv/connection";
5
- //#region src/backendRedis.ts
5
+ // src/backendRedis.ts
6
6
  var v = (t, r = "voltro:cache") => {
7
7
  let o = d(r), v = (t, n, r) => new e({
8
8
  operation: t,
@@ -168,5 +168,4 @@ var v = (t, r = "voltro:cache") => {
168
168
  cause: "Connection unavailable"
169
169
  }))), i.keyPrefix);
170
170
  }));
171
- //#endregion
172
171
  export { y as layerRedis, v as makeRedisCacheStore };
package/dist/errors.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import { Schema as e } from "effect";
2
- //#region src/errors.ts
2
+ // src/errors.ts
3
3
  var t = class extends e.TaggedError()("CacheError", {
4
4
  operation: e.String,
5
5
  key: e.String,
6
6
  cause: e.String
7
7
  }) {};
8
- //#endregion
9
8
  export { t as CacheError };
@@ -1,5 +1,5 @@
1
1
  import { Context as e, Effect as t, Layer as n, PubSub as r, Scope as i, Stream as a } from "effect";
2
- //#region src/invalidationBus.ts
2
+ // src/invalidationBus.ts
3
3
  var o = class o extends e.Service()("@voltro/InvalidationBus", { make: t.gen(function* () {
4
4
  let e = yield* r.unbounded(), n = yield* t.scope;
5
5
  return {
@@ -10,5 +10,4 @@ var o = class o extends e.Service()("@voltro/InvalidationBus", { make: t.gen(fun
10
10
  }) }) {
11
11
  static layer = n.effect(o, o.make);
12
12
  };
13
- //#endregion
14
13
  export { o as InvalidationBus };
package/dist/layer.js CHANGED
@@ -4,7 +4,7 @@ import { layerRedis as n } from "./backendRedis.js";
4
4
  import { Cache as r } from "./Cache.js";
5
5
  import { Config as i, Effect as a, Layer as o, Option as s } from "effect";
6
6
  import { RedisConnections as c, layerConnections as l } from "@voltro/kv/connection";
7
- //#region src/layer.ts
7
+ // src/layer.ts
8
8
  var u = /* @__PURE__ */ e({
9
9
  layer: () => h,
10
10
  makeStoreLayer: () => p,
@@ -21,5 +21,4 @@ var u = /* @__PURE__ */ e({
21
21
  }), p = (e = {}) => o.unwrap(a.gen(function* () {
22
22
  return (yield* i.Literals(["memory", "redis"], "CACHE_BACKEND").pipe(i.withDefault(e.backend ?? "memory"))) === "redis" ? yield* f(e) : yield* d;
23
23
  })), m = p(), h = r.layer.pipe(o.provide(m));
24
- //#endregion
25
24
  export { h as layer, u as layer_exports, p as makeStoreLayer, m as storeLayer };
package/dist/semantic.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CacheStore as e } from "./CacheStore.js";
2
2
  import { Context as t, Effect as n, HashMap as r, HashSet as i, Layer as a, Option as o, Ref as s } from "effect";
3
- //#region src/semantic.ts
3
+ // src/semantic.ts
4
4
  var c = (e, t) => `row:${e}:${t}`, l = (e) => `table:${e}`, u = (e) => {
5
5
  let t = l(e.table);
6
6
  return e.op === "insert" || e.id === void 0 ? [t] : [c(e.table, e.id), t];
@@ -127,5 +127,4 @@ var c = (e, t) => `row:${e}:${t}`, l = (e) => `table:${e}`, u = (e) => {
127
127
  }) }) {
128
128
  static layer = a.effect(r, r.make);
129
129
  };
130
- //#endregion
131
130
  export { v as SemanticCache, d as cosineSimilarity, u as depsForChange, _ as makeSemanticCache, c as rowDep, l as tableDep };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/cache",
3
- "version": "0.87.0",
3
+ "version": "0.89.0",
4
4
  "description": "Effect-native cache primitive — memory + RESP (Redis/Valkey/KeyDB/Dragonfly/Upstash) backends, tag invalidation, single-flight wrap.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -33,10 +33,10 @@
33
33
  "node": ">=24.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@voltro/kv": "0.87.0"
36
+ "@voltro/kv": "0.89.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "effect": "4.0.1"
39
+ "effect": "4.1.0"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"