mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 23:39:15 +01:00
Replace the per-credit invalidation with one signal from the sync's write transactions: if artists, albums or songs changed, the source is marked stale and a single aggregate pass refreshes counts, plays and the credited flag in one query. Identical syncs no longer run any of those scans, and a new credit path cannot forget to invalidate the cache. A changed sync still reads the credit unions once instead of separately for counts and plays, and migration 33->34 remains a frozen snapshot rather than sharing the runtime query text.