feat: cache chat cards in Valkey
Valkey 9.1 in compose caches the immutable chat card (title, members,
created_at) used by GET /chats/{id} and by the membership check of the
message endpoints. Cache-aside with a write after commit, keys per
database, TTL plus allkeys-lru, persistence off. redis-py runs without
retries; on failure the cache is skipped for a few seconds and requests
go to PostgreSQL. Readiness does not depend on Valkey.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,10 @@
|
||||
подменой только `DATABASE__NAME`, прогоняет `make test` и
|
||||
`make student_test`, затем удаляет контейнер и базу — при любом исходе,
|
||||
в том числе по Ctrl+C. Рабочая база и рабочий контейнер API не
|
||||
трогаются. Только stdlib: всё через docker compose и make. Решение 12
|
||||
design change `postgres-storage`.
|
||||
трогаются. Valkey стенда общий: ключи кэша включают имя базы, и
|
||||
карточки тестового прогона не смешиваются с рабочими. Только stdlib:
|
||||
всё через docker compose и make. Решение 12 design change
|
||||
`postgres-storage`.
|
||||
|
||||
Запускается напрямую `$(PYTHON)`, как проверки skeleton, а не через
|
||||
`uv run`: uv пересылает SIGINT дочернему процессу, хотя тот уже получил
|
||||
|
||||
Reference in New Issue
Block a user