cache: add graphql query response caching

This commit is contained in:
a.tolmachev
2026-05-04 09:04:27 +00:00
parent 6cec445b4f
commit b2c5e28cba
9 changed files with 271 additions and 12 deletions
+10 -1
View File
@@ -38,6 +38,10 @@ Implementation slices:
- ключи response cache изолируются минимум по `workspace + agent + operation + request fingerprint`;
- ключи coordination state изолируются минимум по `workspace + agent + cache scope`;
- при отсутствии внешнего cache все эти контуры продолжают работать через in-memory fallback.
7. Довести response cache не только до Community baseline, но и до первых коммерчески ценных read-only hot paths:
- `REST GET`
- `GraphQL query`
при сохранении той же изоляции и opt-in policy.
DoD:
- без `Valkey/Redis` Community и self-hosted deployment остаются рабочими;
@@ -46,6 +50,10 @@ DoD:
- `Enterprise` может подключать cache layer на своей инфраструктуре, включая кластерный вариант;
- runtime/docs/manifests не делают cache обязательным для базового запуска.
- cache boundaries и key namespaces документированы так, чтобы разные агенты и рабочие области не пересекались друг с другом.
- response cache покрывает первый коммерчески значимый protocol set без перехода к небезопасному "cache everything":
- `REST GET`
- `GraphQL query`
- дальнейшее расширение на `gRPC unary` возможно только для явно read-only / cacheable операций.
Verification:
- targeted runtime/admin/mcp tests for cache contracts and fallback mode;
@@ -64,8 +72,9 @@ Progress:
- runtime executor now performs actual response cache reads/writes for eligible `REST GET` operations with keys isolated by `workspace + agent + operation + request fingerprint`
- response cache keys now also include `operation version`, so a new published version does not reuse stale cached payloads from the previous one
- mcp-server published tool catalog now uses shared coordination snapshots across instances, while preserving the same `workspace + agent` isolation model
- response cache runtime/admin contracts now also cover `GraphQL query` as the first commercial protocol extension beyond the `REST GET` baseline
- pending:
- preserve the same isolation model while extending response cache beyond the first `REST GET` hot path
- preserve the same isolation model while extending response cache to the next monetizable read-only path: explicit `gRPC unary` read operations
- wire replay guard into the first real token or nonce flow once commercial machine-token issuance stops being a `Community` stub
- wire coordination state into additional runtime or transport paths beyond the shared published catalog snapshot