ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Server.Cache.Types

Description

Metadata retention budgets, source identities, full fetch values, and the keys entries are stored under.

Synopsis

Configuration

data StoreBudget Source #

Retention floors, used only to stop a store evicting its own live entries.

Constructors

StoreBudget 

Fields

  • sbMinEntries :: Int

    Eviction stops before the retained entry count falls below this floor.

  • sbMinBytes :: Int

    Eviction stops before accounted bytes fall below this floor.

Instances

Instances details
Show StoreBudget Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Eq StoreBudget Source # 
Instance details

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

Instances details
Show CacheConfig Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Eq CacheConfig Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Entries

newtype Source Source #

An upstream base URL partitions entries without carrying credentials.

Constructors

Source Text 

Instances

Instances details
Show Source Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Eq Source Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Methods

(==) :: Source -> Source -> Bool #

(/=) :: Source -> Source -> Bool #

Ord Source Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

data CacheEntry Source #

A typed view paired with its source representation and complete fetch digest.

Constructors

CacheEntry 

Fields

Instances

Instances details
Show CacheEntry Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Eq CacheEntry Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Keys

data CacheKey Source #

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.

Instances

Instances details
Show CacheKey Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Eq CacheKey Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Ord CacheKey Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Hashable CacheKey Source # 
Instance details

Defined in Ecluse.Core.Server.Cache.Types

Methods

hashWithSalt :: Int -> CacheKey -> Int #

hash :: CacheKey -> Int #

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.