| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Server.Cache.Types
Contents
Description
Metadata retention budgets, source identities, full fetch values, and the keys entries are stored under.
Synopsis
- data StoreBudget = StoreBudget {
- sbMinEntries :: Int
- sbMinBytes :: Int
- data CacheConfig = CacheConfig {}
- newtype Source = Source Text
- data CacheEntry = CacheEntry {}
- data CacheKey
- fullKey :: Source -> PackageName -> CacheKey
- versionKey :: Source -> PackageName -> Version -> CacheKey
- assembledKey :: ETag -> CacheKey
- directoryKey :: Source -> Int -> CacheKey
- cacheKeyStore :: CacheKey -> CacheStore
- cacheKeyIdentity :: CacheKey -> ShortByteString
Configuration
data StoreBudget Source #
Retention floors, used only to stop a store evicting its own live entries.
Constructors
| StoreBudget | |
Fields
| |
Instances
| Show StoreBudget Source # | |
Defined in Ecluse.Core.Server.Cache.Types Methods showsPrec :: Int -> StoreBudget -> ShowS # show :: StoreBudget -> String # showList :: [StoreBudget] -> ShowS # | |
| Eq StoreBudget Source # | |
Defined in Ecluse.Core.Server.Cache.Types | |
data CacheConfig Source #
Retention bounds and the TTL for the local selected-version and assembled stores.
Constructors
| CacheConfig | |
Fields
| |
Instances
| Show CacheConfig Source # | |
Defined in Ecluse.Core.Server.Cache.Types Methods showsPrec :: Int -> CacheConfig -> ShowS # show :: CacheConfig -> String # showList :: [CacheConfig] -> ShowS # | |
| Eq CacheConfig Source # | |
Defined in Ecluse.Core.Server.Cache.Types | |
Entries
An upstream base URL partitions entries without carrying credentials.
data CacheEntry Source #
A typed view paired with its source representation and complete fetch digest.
Constructors
| CacheEntry | |
Fields
| |
Instances
| Show CacheEntry Source # | |
Defined in Ecluse.Core.Server.Cache.Types Methods showsPrec :: Int -> CacheEntry -> ShowS # show :: CacheEntry -> String # showList :: [CacheEntry] -> ShowS # | |
| Eq CacheEntry Source # | |
Defined in Ecluse.Core.Server.Cache.Types | |
Keys
One entry's address in one store, built only by fullKey, versionKey, assembledKey and directoryKey.
Two keys are equal when their stores and their identities are, so no two stores share a key.
fullKey :: Source -> PackageName -> CacheKey Source #
The key of one package's full metadata from one source.
versionKey :: Source -> PackageName -> Version -> CacheKey Source #
The key of one selected version: an entry of its own, apart from the package's full metadata.
assembledKey :: ETag -> CacheKey Source #
The key of an assembled response. The validator is its only component: it binds the body to the inputs of the request that built it, and it carries no credential and no caller identity.
directoryKey :: Source -> Int -> CacheKey Source #
The key of one source's public directory under the metadata byte bound it was read with.
cacheKeyStore :: CacheKey -> CacheStore Source #
The store a key addresses.
cacheKeyIdentity :: CacheKey -> ShortByteString Source #
A key's identity within its store: its components in a fixed order, each framed by its length.