bvandeusen
|
16669a0365
|
feat(flutter/cache): AudioCacheManager — pin/unpin/evict + tiered LRU
API:
- isCached(trackId), pathFor(trackId)
- pin(trackId, source) — dio.download → drift index entry
- unpin(trackId), clearAll()
- usageBytes(), evict(targetBytes)
Eviction order: incidental → autoPrefetch → autoPlaylist → autoLiked.
'manual' never evicts via cap-driven eviction; only clearAll() removes
operator-pinned tracks.
Two providers:
- appDbProvider — singleton AppDb per run
- audioCacheManagerProvider — wraps the AppDb + dioProvider
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-09 23:17:14 -04:00 |
|