feat(content): eager invalidation and optimistic lock for cqrs

M4: ADR-038 Eager Invalidation + ADR-039 Optimistic Lock

- EagerInvalidationService: Redis DEL after MySQL commit

- Cache key conventions for textbook/chapter/kp/question

- Version header check (If-Match/X-Expected-Version) on write endpoints

- 409 Conflict on version mismatch

- All write endpoints return updatedAt timestamp
This commit is contained in:
SpecialX
2026-07-15 01:28:20 +08:00
parent 47a062606f
commit a75527be80
26 changed files with 673 additions and 72 deletions

View File

@@ -31,6 +31,7 @@
"dataloader": "^2.2.2",
"drizzle-orm": "^0.31.0",
"graphql": "^16.9.0",
"ioredis": "^5.4.0",
"kafkajs": "^2.2.4",
"mysql2": "^3.11.0",
"neo4j-driver": "^5.23.0",