-- 0068_leveled_stream_cache.up.sql — the size cap of the leveled-stream render -- cache. -- -- Sonos and other UPnP renderers fetch a track's URL themselves, so the phone -- cannot level what they play. The server renders a gain-applied FLAC for them -- instead and keeps it on disk, oldest-used first out once the cache is over -- this size. An admin setting, on the loudness settings row it belongs with. ALTER TABLE loudness_settings ADD COLUMN leveled_cache_mb integer NOT NULL DEFAULT 2048, ADD CONSTRAINT loudness_settings_leveled_cache_range CHECK (leveled_cache_mb >= 256 AND leveled_cache_mb <= 65536);