feat(cache): add in-memory cache service (ADR-0022 Phase 1 part 2) (#23)
All checks were successful
CI/CD Pipeline / Build Docker Cache (push) Successful in 50s
CI/CD Pipeline / CI Pipeline (push) Successful in 4m22s
CI/CD Pipeline / Trigger Docker Push (push) Successful in 6s

Phase 1 part 2 of ADR-0022 (companion to PR #22 rate-limit). In-memory cache service via go-cache, used by /api/version (60s TTL).

6/6 unit tests pass. ~95% Mistral autonomous via ICM workspace, cost €2.50 stages 01-02 (50% reduction vs T5 thanks to pre-extracted snippets in shared/).

Co-authored-by: Gabriel Radureau <arcodange@gmail.com>
Co-committed-by: Gabriel Radureau <arcodange@gmail.com>
This commit was merged in pull request #23.
This commit is contained in:
2026-05-03 13:24:17 +02:00
committed by arcodange
parent 54dd0cc80f
commit 358e3df38b
7 changed files with 296 additions and 14 deletions

View File

@@ -87,4 +87,15 @@ database:
# Maximum lifetime of connections (default: "1h")
# Format: number + unit (s, m, h)
conn_max_lifetime: 1h
conn_max_lifetime: 1h
# Cache configuration (in-memory)
cache:
# Enable in-memory cache (default: true)
enabled: true
# Default TTL in seconds for cache items (default: 300 = 5 minutes)
default_ttl_seconds: 300
# Cleanup interval in seconds for expired items (default: 600 = 10 minutes)
cleanup_interval_seconds: 600