@open-mercato/cache 0.6.7-develop.6774.1.d836fe3135 → 0.6.7-develop.6784.1.f80b9afce5
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/AGENTS.md +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -59,7 +59,7 @@ await cacheService.invalidateTag('customers') // Clears all customer-related ca
|
|
|
59
59
|
|
|
60
60
|
Cache invalidation and query-index side effects (`emitCrudSideEffects`) MUST fire **after** the originating domain write commits — the same rule that keeps them OUTSIDE the `withAtomicFlush` block (see `packages/core/AGENTS.md` → "Entity Update Safety — `withAtomicFlush`"). Because invalidation runs post-commit and the query-index read-projection tail (search tokens, vectors, fulltext, coverage) converges asynchronously, reads can briefly see a short convergence window after a write.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
The opt-in env flag `OM_CACHE_SAFETY_ALWAYS_CONSISTENT` (default **OFF**, 100% backward compatible) makes that read-projection tail converge synchronously on write and propagates index-write failures instead of swallowing them — at the cost of added write latency. It does not move query-index side effects into the domain-write transaction. See `.ai/specs/2026-06-05-cache-safety-always-consistent.md`.
|
|
63
63
|
|
|
64
64
|
## Adding Caching to a Module
|
|
65
65
|
|
package/package.json
CHANGED