packages feed

cache 0.1.1.0 → 0.1.1.1

raw patch · 2 files changed

+6/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

cache.cabal view
@@ -1,5 +1,5 @@ name:           cache-version:        0.1.1.0+version:        0.1.1.1 synopsis:       An in-memory key/value store with expiration support homepage:       https://github.com/hverr/haskell-cache#readme license:        BSD3
src/Data/Cache.hs view
@@ -225,7 +225,7 @@  -- $use ----- All operations are atomically executed in the IO monad. The+-- All operations are automically executed in the IO monad. The -- underlying data structure is @Data.HashMap.Strict@. -- -- First create a cache using 'newCache' and possibly a default@@ -236,6 +236,10 @@ -- only return a value when the item is in the cache and it is not -- expired. The 'lookup' function will automatically delete the -- item if it is expired, while 'lookup'' won't delete the item.+--+-- Note that items are __not purged automatically__ in the background when they+-- expire. You have to manually call 'lookup' to purge a single item, or call+-- 'purgeExpired' to purge all expired items. -- -- > >>> c <- newCache Nothing :: IO (Cache String String) -- > >>> insert c "key" "value"