Repository navigation
Minor Changes
- Store visit counts and serve logs in a dedicated SQLite stats database
(STATS_PATH, default./data/stats.db) instead of the KV cache, so clearing
the cache keeps them. Existing KV stats are imported once on startup. Daily
stats and serve logs are kept forSTATS_RETENTION_DAYS(default 90). - Track bot page views, file requests, not-found and unavailable responses per
site, plus per-path request counts, and show them on site status pages. - Persist gateway request counters (by status class, site/gateway and blob cache
outcome), cumulative blob cache metrics and total uptime across restarts.
/healthaddsfirstStartedAt,totalUptime,requestsand
blobCacheTotals. - Render the home, trending, site and author pages immediately after a restart
from a saved directory snapshot and author names, until relays re-sync. The
last relay sync time and profile lookup times also survive restarts.
Patch Changes
- Fix lost visit counts and serve-log records on graceful shutdown: buffered
stats are now flushed before the KV store closes.
Upgrade Notes
- Stats now live in a SQLite database at
STATS_PATH(default
./data/stats.db). Keep it on persistent storage separate from the cache.
Docker Compose adds annsite_datavolume mounted at/data; for
docker run, add-e STATS_PATH=/data/stats.db -v nsite_data:/data. See
deployment. - On first start, visit counts and serve logs are imported from the KV cache
into the stats database and removed from KV, so a gateway downgraded to 3.7
starts its visit counts from zero. - Daily stats and serve logs are kept for
STATS_RETENTION_DAYS(default 90,
previously 30 days for daily hits and 7 for serve logs).
Validation: type checking, 93 unit tests, and the blob-cache and verified-cache integration suites passed.