Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.43 KB

CHANGELOG.md

File metadata and controls

36 lines (26 loc) · 1.43 KB

Revision history for cached-io

1.3.0.0

  • Breaking Caching functions previously returned m (t a), but it was easy to accidentally use join when m and t were the same monad (eg. IO (IO a)), and not get any caching at all. These functions now use a Cached newtype for t a to make it more difficult to misuse.

Migrating from <=1.2.0.0 to 1.3.0.0

-- Previous versions
f :: IO ()
f = do
  cachedAction <- cachedIO action :: IO (IO a)
  cachedResult <- cachedAction

-- New version
f :: IO ()
f = do
  cachedAction <- cachedIO action :: IO (Cached IO a)
  cachedResult <- runCached cachedAction

1.2.0.0

Thank you glasserc for your work on previous versions, and a special thanks to Arguggi for contributing many of the improvements incorporated into this version.

  • Bellroy is the new maintainer of this package. See glasserc#1.
  • New cachedIO' and cachedIOWith' support generating an action depending on the most recent cached value and its timestamp, if there was one.
  • cachedIO ttl f can now be run in a different monad to f. Similarly for cachedIO', cachedIOWith, cachedIOWith'.
  • Fixes uncaught exceptions leaving the cache in a deadlocked state and other problems.

1.1.0.0 and prior

These versions were published by glasserc.