shared-resource-cache: A thread-safe cache for sharing resources across threads with automatic expiry
A cache designed for guaranteeing that different threads can share the same reference to a resource. For example, it allows threads to communicate via a shared
TChan broadcast channel.
Using resourcet, items are only removed from the cache after no sharers are holding the
resource and the item has expired (according to the expiry configuration the cache was constructed with.)
Note: an MVar is used to coordinate between threads that only one thread does the initial load of the resource with the given IO action if multiple threads try and retrieve a resource that is not yet cached at the same time.
[Skip to Readme]
Downloads
- shared-resource-cache-0.2.0.3.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.7 && <5), focus (>=1.0 && <1.1), hashable (>=1.3 && <2), list-t (>=1.0 && <1.1), resourcet (>=1.3 && <1.4), stm (>=2.4 && <2.6), stm-containers (>=1.2 && <2), text (>=2.0 && <2.2), time (>=1.12 && <2) [details] |
| License | MIT |
| Copyright | 2026 Gordon Martin |
| Author | Gordon Martin |
| Maintainer | gordonhughmartin@gmail.com |
| Uploaded | by happy0 at 2026-04-07T21:17:40Z |
| Category | Concurrency |
| Home page | https://github.com/happy0/shared-resource-cache#readme |
| Bug tracker | https://github.com/happy0/shared-resource-cache/issues |
| Source repo | head: git clone https://github.com/happy0/shared-resource-cache |
| Downloads | 27 total (27 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2026-04-07 [all 1 reports] |