Исправление ошибок

This commit is contained in:
2026-10-27 20:29:33 +03:00
parent c60c78b51e
commit 0701e4dcc1
20 changed files with 293 additions and 94 deletions
+15
View File
@@ -0,0 +1,15 @@
-- Lab3 durable cache invalidation queue.
--
-- Logout deletes the authoritative session row in PostgreSQL and enqueues the
-- token hash here in the SAME transaction. A lightweight background drainer in
-- each API replica removes the corresponding Valkey cache key and then the row.
-- If Valkey was unreachable at logout time, the row survives and the stale
-- cache entry is removed as soon as the cache comes back, instead of being
-- trusted until its TTL.
create table if not exists cache_invalidations (
token_hash text primary key,
created_at timestamptz not null default now()
);
create index if not exists cache_invalidations_created_at_idx
on cache_invalidations (created_at);