| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Server.Cache.Backend
Description
Optional retention with bounded external operations and backend-owned codecs.
Synopsis
- data RetentionBackend k v
- data RetentionOperations k v = RetentionOperations {}
- data BackendStorage
- data Recency
- data CacheOccupancy = CacheOccupancy {
- occEntries :: Int
- occBytes :: Int
- retentionBackend :: BackendStorage -> RetentionOperations k v -> RetentionBackend k v
- supportsFullRetention :: BackendStorage -> Bool
Documentation
data RetentionBackend k v Source #
Backend-owned storage, independent of request coalescing and admission.
data RetentionOperations k v Source #
Typed storage operations. Recency is advisory and occupancy reporting is optional. Adapters may report charged bytes and entry counts. These do not measure process or remote heap size.
Constructors
| RetentionOperations | |
data BackendStorage Source #
Local storage cannot retain full metadata, regardless of its capacity.
Constructors
| LocalStorage | |
| ExternalStorage Int | External operation deadline, in microseconds, capped by the handle. |
Instances
| Show BackendStorage Source # | |
Defined in Ecluse.Core.Server.Cache.Backend.Internal Methods showsPrec :: Int -> BackendStorage -> ShowS # show :: BackendStorage -> String # showList :: [BackendStorage] -> ShowS # | |
| Eq BackendStorage Source # | |
Defined in Ecluse.Core.Server.Cache.Backend.Internal Methods (==) :: BackendStorage -> BackendStorage -> Bool # (/=) :: BackendStorage -> BackendStorage -> Bool # | |
Whether a probe contributes to eviction recency.
Constructors
| PreserveRecency | |
| RefreshRecency |
data CacheOccupancy Source #
Entry count and summed accounted bytes after a store mutation.
Constructors
| CacheOccupancy | |
Fields
| |
Instances
| Show CacheOccupancy Source # | |
Defined in Ecluse.Core.Server.Cache.Backend.Internal Methods showsPrec :: Int -> CacheOccupancy -> ShowS # show :: CacheOccupancy -> String # showList :: [CacheOccupancy] -> ShowS # | |
| Eq CacheOccupancy Source # | |
Defined in Ecluse.Core.Server.Cache.Backend.Internal Methods (==) :: CacheOccupancy -> CacheOccupancy -> Bool # (/=) :: CacheOccupancy -> CacheOccupancy -> Bool # | |
retentionBackend :: BackendStorage -> RetentionOperations k v -> RetentionBackend k v Source #
Build storage independently of request coalescing. External deadlines cap at one second. Adapters own TTL, bounded decoding, identity validation, and storage representation.
supportsFullRetention :: BackendStorage -> Bool Source #
Only external storage is eligible to retain full metadata.