Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype LruHandle k v = LruHandle (IORef (LruCache k v))
- newLruHandle :: Int -> IO (LruHandle k v)
- cached' :: (Hashable k, Ord k) => (u -> Maybe (LruHandle k v)) -> k -> GenHaxl u w v -> GenHaxl u w v
- cached :: (Hashable k, Ord k) => (u -> Maybe (LruHandle k v)) -> k -> GenHaxl u w (Maybe v) -> GenHaxl u w (Maybe v)
- remove :: (Hashable k, Ord k) => (u -> Maybe (LruHandle k v)) -> k -> GenHaxl u w ()
- updateLruHandle :: (Hashable k, Ord k) => LruHandle k v -> Int -> IO ()
Documentation
Store a LRU cache in an 'IORef to be able to conveniently update it.
newLruHandle :: Int -> IO (LruHandle k v) #
Create a new LRU cache of the given size.
cached' :: (Hashable k, Ord k) => (u -> Maybe (LruHandle k v)) -> k -> GenHaxl u w v -> GenHaxl u w v Source #