Skip to main content

Module prefetch_engine

Module prefetch_engine 

Source
Expand description

StoragePrefetchEngine — Intelligent prefetch engine that learns access patterns and pre-warms the cache by predicting future access.

§Overview

The prefetch engine observes storage access events, maintains a sliding window of recent accesses, and identifies co-access pairs (CIDs frequently accessed together within a configurable time window). When a CID is accessed the engine scores all known co-access partners using a recency-weighted count and returns up to max_prefetch_hints sorted hints to the caller.

In addition to co-access correlation the engine detects per-CID access patterns (Sequential, Repeated, Random, Strided, Unknown) to help callers adapt their prefetch depth.

Structs§

CoAccessPair
A pair of CIDs that have been observed to be accessed within the same time window.
PeAccessEvent
A single storage access event recorded by the prefetch engine.
PeConfig
Configuration for StoragePrefetchEngine.
PePrefetchHint
A predicted-access hint produced by the engine.
PePrefetchStats
Aggregate statistics produced by StoragePrefetchEngine::stats.
StoragePrefetchEngine
Intelligent prefetch engine: records access events, identifies co-access pairs, detects per-CID access patterns, and generates prioritised prefetch hints.

Enums§

PeAccessPattern
The access pattern detected for a single CID.
PeAccessType
The kind of storage operation that was performed.