| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.Cache
Description
Store results of named computations.
Synopsis
- create :: MonadIO m => EvictionPolicy -> m Cache
- cached :: MonadIO m => Cache -> String -> m ByteString -> m ByteString
- enforce :: MonadIO m => EvictionPolicy -> m ()
- newtype Store = Store FilePath
- data EvictionPolicy
- data Cache
- data MaxBytes
- data MaxAgeDays
Documentation
cached :: MonadIO m => Cache -> String -> m ByteString -> m ByteString Source #
Try to get result from cache. If not present, run computation.
enforce :: MonadIO m => EvictionPolicy -> m () Source #
data EvictionPolicy Source #
Constructors
| Evict MaxBytes MaxAgeDays Store | |
| NoStorage |
data MaxAgeDays Source #
Constructors
| MaxAgeDays Int | |
| NoMaxAge |