effectful-data-cache-memcache: memcached backend for effectful-data-cache

[ bsd3, cache, library ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.2.1.0
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), bytestring (>=0.11 && <0.13), clock (>=0.8 && <0.9), effectful-core (>=2.3 && <3), effectful-data-cache (>=0.2 && <0.3), memcache (>=0.3 && <0.4) [details]
License BSD-3-Clause
Copyright 2026 drlkf
Author drlkf
Maintainer drlkf <drlkf@drlkf.net>
Uploaded by drlkf at 2026-10-26T01:01:19Z
Category cache
Home page https://github.com/haskell-github-trust/effectful-data-cache#readme
Bug tracker https://github.com/haskell-github-trust/effectful-data-cache/issues
Source repo head: git clone https://github.com/haskell-github-trust/effectful-data-cache
Distributions
Downloads 0 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for effectful-data-cache-memcache-0.2.1.0

[back to package description]

effectful-data-cache-memcache

runCacheMemcache interprets Cache against memcached using the memcache client.

import Database.Memcache.Client (def, newClient)
import Effectful.Cache.Memcache

codec :: Codec String Int
codec = Codec BC.pack (BC.pack . show) (readMaybe . BC.unpack)

main = do
  c <- newClient [def] def
  runEff . runCacheMemcache codec c Nothing $ insert "key" (42 :: Int)

memcached cannot enumerate items: keys, filterWithKey and size throw MemcacheUnsupported. lookup' behaves like lookup and purgeExpired is a no-op. Expirations are rounded up to whole seconds.