Skip to main content

Module disk_cache

Module disk_cache 

Source
Expand description

Write-back disk cache: blocks are buffered and flushed in large, offset-ordered coalesced batches (fewer writes/seeks); a piece hits stable storage before it is verified. Read-through serves seeding reads.

no_std + alloc, zero unsafe.

Structs§

CacheStats
Coalescing statistics (surfaced to the UI/monitoring).
DiskCache
Write-back cache keyed by (disk handle, offset), plus a small bounded read-through LRU for seeding/upload reads: flushed pieces leave the dirty map, so the LRU keeps them resident and repeated upload reads (disk speed ≫ upload speed) are served from RAM instead of disk.