Skip to main content

Module disk_cache

Module disk_cache 

Source
Expand description

Disk-based cache storage backend

Implements Pingora’s Storage trait using the local filesystem. Each cached response is stored as a pair of files (.meta + .body) distributed across sharded subdirectories to keep per-directory inode counts manageable.

§Directory layout

<base_path>/
  shard-00/
    <2-char-hex-prefix>/
      <combined-hex-hash>.meta
      <combined-hex-hash>.body
    tmp/
  shard-01/
    ...

Structs§

DiskCacheStorage
Disk-based cache storage backend implementing Pingora’s Storage trait.
DiskHitHandler
Hit handler for disk cache lookups.
DiskMissHandler
Miss handler for disk cache writes.

Functions§

rebuild_eviction_state
Scan disk entries and register them with the eviction manager.