Copyright | (c) 2014 Edward L. Blake |
---|---|
License | BSD-style |
Maintainer | Edward L. Blake <edwardlblake@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Types common to Caching.ExpiringCacheMap.OrdECM and Caching.ExpiringCacheMap.HashECM.
- data CacheSettings = CacheWithLRUList {}
- data ECM a b s m k v
- data CacheState s m k v
- type TimeUnits = Int
- type ECMMapSize = Int
- type ECMULength = Int
- type ECMIncr = Word32
- type ECMNewState a b s m k v = CacheState s m k v -> a (b (CacheState s m k v))
- type ECMEnterState a b s m k v = b (CacheState s m k v) -> (CacheState s m k v -> a (CacheState s m k v, v)) -> a v
- type ECMReadState a b s m k v = b (CacheState s m k v) -> a (CacheState s m k v)
Configuration
data CacheSettings Source
Cache encapsulation
data CacheState s m k v Source
The cache state.
Types
Integer involved in the time units used to determine when an item expires. The time units used can be any arbitrary integer time representation, such as seconds or milliseconds for examples. They can also be deterministic time steps in a sequencing monad.
type ECMMapSize = Int Source
Integer involved in the size of a key-value map.
type ECMULength = Int Source
Integer involved in the length of the usage history list.
Unsigned integer (Word32
) involved in the cache state incrementing accumulator.
Types for state function
type ECMNewState a b s m k v = CacheState s m k v -> a (b (CacheState s m k v)) Source
type ECMEnterState a b s m k v = b (CacheState s m k v) -> (CacheState s m k v -> a (CacheState s m k v, v)) -> a v Source
type ECMReadState a b s m k v = b (CacheState s m k v) -> a (CacheState s m k v) Source