io-memoize-1.1.0.0: Memoize IO actions

Safe HaskellSafe-Inferred

Control.Concurrent.Cache

Synopsis

Documentation

data Cache a Source

A thread-safe write-once cache.

newCache :: IO (Cache a)Source

Create an empty cache.

fetch :: Cache a -> IO a -> IO aSource

Fetch the value stored in the cache, or call the supplied fallback and store the result, if the cache is empty.