package com.fabledsword.minstrel.cache.audiocache

/**
 * Defaults for the 2-bucket audio cache. Matches the Flutter client.
 *
 *  - `likedCapBytes`: cap for the protected bucket — cached files for
 *    tracks the user has liked. Evicted only after the rolling bucket
 *    is fully drained (almost never under normal use).
 *  - `rollingCapBytes`: cap for the unprotected bucket — incidental /
 *    auto-prefetch downloads. LRU within this bucket.
 *
 * Phase 11 (Settings) will allow user overrides; the values are kept
 * generous so first-time installs work well without configuration.
 */
data class CacheConfig(
    val likedCapBytes: Long = DEFAULT_LIKED_CAP_BYTES,
    val rollingCapBytes: Long = DEFAULT_ROLLING_CAP_BYTES,
) {
    companion object {
        const val DEFAULT_LIKED_CAP_BYTES: Long = 200L * 1024 * 1024 // 200 MiB
        const val DEFAULT_ROLLING_CAP_BYTES: Long = 150L * 1024 * 1024 // 150 MiB
    }
}
