vikunja/pkg/metrics
kolaente 051f734f3d refactor(metrics): count entities on demand with a TTL cache
Instead of priming a counter at startup and keeping it in sync via events,
each entity count is now read directly from the database and cached for
30s (countCacheTTL). The cache is the correctness guarantee: counts are at
most one TTL stale and self-healing, so they can never permanently drift.

This fixes vikunja_user_count never updating after registration (#2650):
the count no longer depends on every mutation path dispatching an event.
2026-05-30 13:48:01 +00:00
..
active_users.go fix: correct license header references (#882) 2025-06-10 12:18:38 +02:00
metrics.go refactor(metrics): count entities on demand with a TTL cache 2026-05-30 13:48:01 +00:00