ouroboros-consensus-0.1.0.1: Consensus layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index

Synopsis

Index

data Index m blk h Source #

Bundle the operations on the primary and secondary index that touch the files. This allows us to easily introduce an intermediary caching layer.

Constructors

Index

Fields

File-backed index

Cached index

cachedIndex Source #

Arguments

:: forall m blk h. ( IOLike m, ConvertRawHash blk, StandardHash blk, Typeable blk)
=> HasFS m h
-> ResourceRegistry m
-> Tracer m TraceCacheEvent
-> CacheConfig
-> ChunkInfo
-> ChunkNo

Current chunk

-> m ( Index m blk h)

Caches the current chunk's indices as well as a number of past chunk's indices.

Spawns a background thread to expire past chunks from the cache that haven't been used for a while.