Files
mtusi2026lab2/evidence/expiry.txt
T
Pavel Grigorev 90a0532809
Application / stack (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
Отзывать сессию в кэше до удаления в PostgreSQL
2026-10-31 10:25:02 +03:00

11 lines
589 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# python student-tests/expiry_check.py --ttl 2
# date: 2026-10-31T07:20:24Z; host: Windows 10, Docker Desktop 27.2.0, 12 CPU / 1.9 GiB for Docker VM
пересоздаю api с SESSION_TTL_SECONDS=2
сразу после входа: /users/me -> 200
TTL ключа этой сессии в Valkey: 1 с (-2 = ключа нет)
через 3.5 с: /users/me -> 401, WWW-Authenticate: Bearer realm="messenger"
logout истёкшим токеном -> 401
PASS: сессия истекла по SESSION_TTL_SECONDS=2, кэш не продлил её
возвращаю api с TTL из .env