exp-cache-0.1.0.1

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 # 

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 #

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

Methods

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

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

Show k => Show (LFU k) Source # 

Methods

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

show :: LFU k -> String #

showList :: [LFU k] -> ShowS #

For testing