Concurrent-Cache-0.1.0.0: A Cached variable for IO functions.

Safe HaskellSafe
LanguageHaskell2010

Concurrent.Cache

Synopsis

Documentation

fetch Source #

Arguments

:: CachedData a

Cache, the cache to fetch a value from

-> IO a 

Fetch data from a cache

createCache Source #

Arguments

:: Int

Timeout in microseconds before the cache is erased, 0 to disable emptying of the cache

-> IO a

Fetcher, the function that returns the data which should be cached. If Timeout is not set to zero, this function must be allowed to be called more than once.

-> IO (CachedData a) 

Create a cache with a timeout from an (IO ()) function.