-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A Cached variable for IO functions. -- -- This package allows for caching IO functions, either on a timeout or -- designed to only fetch once. @package Concurrent-Cache @version 0.2.2.2 module Control.Concurrent.Cache data CachedData a -- | Fetch data from a cache @since 0.1.0.0 fetch :: CachedData a -> IO (a) -- | Only fetch data if it has been cached. @since 0.2.1.0 fetchCached :: CachedData a -> IO (Maybe a) -- | Create a cache which will execute an (IO ()) function on demand a -- maximum of 1 times. @since 0.2.0.0 createReadOnceCache :: IO (a) -> IO (CachedData a) -- | Create a cache with a timeout from an (IO ()) function. @since 0.2.0.0 createTimedCache :: Int -> Bool -> IO (a) -> IO (CachedData a) -- | Create a cache variable which simply holds a value with no actual -- caching at all. @since 0.2.2.2 createCachePassthrough :: a -> CachedData a