Skip to main content

Module chunk_cache

Module chunk_cache 

Source

Modules§

error

Structs§

CacheConfig
CacheRange
Return dto for cache gets offsets has 1 more than then number of chunks in the specified range suppose the range is for chunks [2, 5) then offsets may look like: [0, 2000, 4000, 6000] where chunk 2 is made of bytes [0, 2000) chunk 3 [2000, 4000) and chunk 4 is [4000, 6000). It is guaranteed that the first number in offsets is 0 and the last number is data.len()
DiskCache
DiskCache is a ChunkCache implementor that saves data on the file system
RandomEntryIterator

Constants§

RANGE_LEN

Traits§

ChunkCache
ChunkCache is a trait for storing and fetching Xorb ranges. implementors are expected to return bytes for a key and a given chunk range (no compression or further deserialization should be required) Range inputs use chunk indices in an end exclusive way i.e. [start, end)

Functions§

get_cache
get_cache attempts to return a cache given the provided config parameter
print_directory_contents
random_bytes
random_key
random_range