packages feed

shikumi-cache-redis-0.1.2.0: shikumi-cache-redis.cabal

cabal-version:   3.4
name:            shikumi-cache-redis
version:         0.1.2.0
synopsis:        Redis-backed shikumi cache (EP-6)
category:        AI
description:
  A Redis backend for shikumi's @Cache@ effect (EP-6), kept in a separate
  package so the heavy @hedis@ client and a running Redis server are only
  pulled in when actually used. Entries are stored under the string key
  @shikumi:cache:\<hex\>@ with a configurable TTL; the value is the UTF-8 JSON of
  a @CachedResponse@ (the @Response@ round-trip comes from @shikumi-cache@'s
  @Shikumi.Cache.ResponseJSON@).

license:         BSD-3-Clause
author:          Nadeem Bitar
maintainer:      nadeem@gmail.com
build-type:      Simple
extra-doc-files: CHANGELOG.md

common common-options
  ghc-options:
    -Wall -Wcompat -Widentities -Wincomplete-uni-patterns
    -Wincomplete-record-updates -Wredundant-constraints
    -fhide-source-paths -Wmissing-export-lists -Wpartial-fields
    -Wmissing-deriving-strategies

  default-language:   GHC2024
  default-extensions:
    DeriveAnyClass
    DuplicateRecordFields
    OverloadedLabels
    OverloadedStrings

library
  import:          common-options
  hs-source-dirs:  src
  exposed-modules: Shikumi.Cache.Backend.Redis
  build-depends:
    , aeson
    , base           >=4.20     && <5
    , bytestring
    , effectful
    , hedis
    , shikumi-cache  ^>=0.1.2.0
    , text           ^>=2.1

test-suite shikumi-cache-redis-test
  import:         common-options
  type:           exitcode-stdio-1.0
  hs-source-dirs: test
  main-is:        Main.hs
  ghc-options:    -threaded -with-rtsopts=-N
  build-depends:
    , baikai               >=0.3      && <0.4
    , base
    , bytestring
    , effectful
    , generic-lens
    , hedis
    , lens
    , shikumi              ^>=0.3.0.0
    , shikumi-cache        ^>=0.1.2.0
    , shikumi-cache-redis  ^>=0.1.2.0
    , tasty
    , tasty-hunit
    , text
    , time
    , vector