exp-cache-0.1.0.2

Safe HaskellNone
LanguageHaskell2010

Data.Cache.Eviction.LFU

Synopsis

Documentation

data LFU k Source #

Evict the least frequently used element from the cache. This means as an element is accessed, its "score" increases and the element is more likely to survive eviction once the cache fills up.

Instances
EvictionStrategy LFU Source # 
Instance details

Defined in Data.Cache.Eviction.LFU

Methods

recordLookup :: (Eq k, Hashable k, Ord k) => k -> LFU k -> LFU k Source #

evict :: (Eq k, Hashable k, Ord k) => LFU k -> (LFU k, Maybe k) Source #

(Hashable k, Ord k) => Eq (LFU k) Source # 
Instance details

Defined in Data.Cache.Eviction.LFU

Methods

(==) :: LFU k -> LFU k -> Bool #

(/=) :: LFU k -> LFU k -> Bool #

Show k => Show (LFU k) Source # 
Instance details

Defined in Data.Cache.Eviction.LFU

Methods

showsPrec :: Int -> LFU k -> ShowS #

show :: LFU k -> String #

showList :: [LFU k] -> ShowS #

For testing