cached-io: A simple library to cache IO actions

[ apache, development, library, program ] [ Propose Tags ]

Provides functions that convert an IO action into a cached one by storing the original result for a period of time, or until some condition is met.

[Skip to Readme]


[Index] [Quick Jump]


Manual Flags


compile with -Werror to make warnings fatal


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,,
Change log
Dependencies base (>= && <4.20), cached-io, exceptions (>=0.10.4 && <0.11), stm (>=2.5 && <2.6), time (>=1.9.3 && <1.15), transformers (>= && <0.7) [details]
License Apache-2.0
Author SumAll, Inc.
Maintainer Bellroy Tech Team <>
Category Development
Source repo head: git clone
Uploaded by jack at 2024-03-12T01:24:06Z
Distributions NixOS:
Executables test-cachedIO
Downloads 2677 total (24 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-03-12 [all 1 reports]

Readme for cached-io-

[back to package description]

cached-io: cache a single IO action

Sometimes you have an action that does something really expensive whose results don't change that much. This is a simple library that lets you cache the output of that expensive action for a developer-specified length of time.

test/test-cachedIO.hs shows a very basic usage example.

Developing this library

All standardised tooling is provided by flake.nix.

nix develop

Formatting code

To format use
*.cabal cabal-fmt (cabal-fmt --inplace *.cabal)
*.nix nixpkgs-fmt (nixpkgs-fmt *.nix)

We have not yet chosen a formatter for Haskell source. For now, try to follow the style of surrounding code.


The GitHub Actions CI workflow for this repo is generated by haskell-ci:

haskell-ci regenerate