Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BranchCache m = BranchCache {
- lookupCachedBranch :: CausalHash -> m (Maybe (Branch m))
- insertCachedBranch :: CausalHash -> Branch m -> m ()
- newBranchCache :: forall m. MonadIO m => m (BranchCache Transaction)
Documentation
data BranchCache m Source #
A cache of Branch
by CausalHash
es.
BranchCache | |
|
newBranchCache :: forall m. MonadIO m => m (BranchCache Transaction) Source #
Creates a BranchCache
which uses weak references to only keep branches in the cache for
as long as they're reachable by something else in the app.
This means you don't need to worry about a Branch not being GC'd because it's in the cache.