| Copyright | (c) 2018 Henri Verroken |
|---|---|
| License | BSD3 |
| Maintainer | Henri Verroken <henriverroken@gmail.com> |
| Stability | stable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Cache.Internal
Description
This modules exposes some of the internals of Cache as well as some
auxiliary functions for expert users.
Synopsis
- data Cache k v = Cache {
- container :: TVar (HashMap k (CacheItem v))
- defaultExpiration :: Maybe TimeSpec
- data CacheItem v = CacheItem {
- item :: v
- itemExpiration :: Maybe TimeSpec
- nowSTM :: STM TimeSpec
Cache constructor
The cache with keys of type k and values of type v.
Create caches with the newCache and copyCache functions.
Constructors
| Cache | |
Fields
| |
A container data type holding a cache item.
Constructors
| CacheItem | |
Fields
| |