Commit Graph

2 Commits

Author SHA1 Message Date
user
6a248756b5 refactor: consolidate applyMigrations into single exported function
All checks were successful
check / check (push) Successful in 1m8s
Remove the unexported applyMigrations() and the runMigrations() method.
ApplyMigrations() is now the single implementation, accepting context
and an optional logger. connect() calls it directly.

All callers updated to pass context.Background() and nil logger.
2026-03-17 01:51:46 -07:00
clawbot
e3b346e881 fix: correct Stats() to scan only hit/miss counts, compute HitRate properly
Stats() was scanning 5 SQL columns (hit_count, miss_count,
upstream_fetch_count, upstream_fetch_bytes, transform_count) into
mismatched struct fields, causing HitRate to contain the integer
transform_count instead of a 0.0-1.0 ratio.

Simplify the query to only fetch hit_count and miss_count, then
compute TotalItems, TotalSizeBytes, and HitRate correctly.

Fixes #4
2026-02-08 15:59:27 -08:00