diff --git a/Readme.md b/Readme.md index 07a879d..36f6b50 100644 --- a/Readme.md +++ b/Readme.md @@ -26,7 +26,7 @@ main = do Cache.mkConfig 60 Monotonic -- we create a cached version of computation -- in order to hide implementation - let cachedTimeout input = Cache.requestOr cache input \i -> do + let cachedTimeout input = Cache.cacheIO cache \i -> do threadDelay $ i * 1_000_000 pure i -- We use our cached function diff --git a/src/System/Cache.hs b/src/System/Cache.hs index cbd31a2..c2032e0 100644 --- a/src/System/Cache.hs +++ b/src/System/Cache.hs @@ -24,7 +24,7 @@ -- Cache.'System.Cache.mkConfig' 60 'System.Clock.Seconds.MonotonicCoarse' -- -- we create a cached version of computation -- -- in order to hide implementation --- let cachedTimeout = Cache.'System.Cache.mkCached' @cache@ \i -> do +-- let cachedTimeout = Cache.'System.Cache.cacheIO' @cache@ \\i -> do -- threadDelay $ i * 1_000_000 -- pure i -- -- We use our cached function