arbor-lru-cache-0.1.1.0

Safe HaskellNone
LanguageHaskell2010

Arbor.LruCache

Documentation

lookup :: Ord k => k -> Cache k v -> IO v Source #

makeCache :: CacheConfig -> (k -> IO v) -> (k -> v -> IO ()) -> IO (Cache k v) Source #

data CacheConfig Source #

Constructors

CacheConfig 
Instances
Eq CacheConfig Source # 
Instance details

Defined in Arbor.LruCache.Type

Show CacheConfig Source # 
Instance details

Defined in Arbor.LruCache.Type

Generic CacheConfig Source # 
Instance details

Defined in Arbor.LruCache.Type

Associated Types

type Rep CacheConfig :: * -> * #

type Rep CacheConfig Source # 
Instance details

Defined in Arbor.LruCache.Type

type Rep CacheConfig = D1 (MetaData "CacheConfig" "Arbor.LruCache.Type" "arbor-lru-cache-0.1.1.0-C7a14k7SXkFAiyI8dwMdDV" False) (C1 (MetaCons "CacheConfig" PrefixI True) (S1 (MetaSel (Just "maxRequestsInFlight") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "maxOccupancy") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

data Cache k v Source #

Constructors

Cache 
Instances
Generic (Cache k v) Source # 
Instance details

Defined in Arbor.LruCache.Type

Associated Types

type Rep (Cache k v) :: * -> * #

Methods

from :: Cache k v -> Rep (Cache k v) x #

to :: Rep (Cache k v) x -> Cache k v #

type Rep (Cache k v) Source # 
Instance details

Defined in Arbor.LruCache.Type

entries :: Ord k => Cache k v -> IO (Map k (Maybe v)) Source #