ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Server.Cache.VersionWeight

Description

Conservative accounting for selectively decoded releases. The cache charges backing allocations and repeated structures without deduplicating sharing. A retained raw version object is charged on the shared wire-to-resident model, without encoding it.

Synopsis

Documentation

weighVersion :: VersionRead -> Int Source #

Estimate retained release bytes. maxBound marks an uncacheable saturated estimate.

weighEntryKey :: EntryKey -> Integer Source #

Charge an entry coordinate, including any retained text backing allocation.