Skip to main content

Module refresh

Module refresh 

Source
Expand description

Auto-refresh functionality for frequently accessed cache entries.

This module provides enterprise-grade auto-refresh capabilities that proactively refresh frequently-accessed cache entries before they expire, reducing cache misses and latency.

§Architecture

  • AccessTracker: Lock-free access frequency tracking with time-decay
  • RefreshMetadata: Minimal request reconstruction data
  • AutoRefreshConfig: Configuration for auto-refresh behavior
  • RefreshManager: Background task orchestration with graceful shutdown

§Safety

  • Zero panics in production code paths
  • Graceful error handling and degradation
  • Proper resource cleanup on Drop
  • Thread-safe and async-safe

Structs§

AccessTracker
Tracks access frequency for cache keys.
AutoRefreshConfig
Configuration for auto-refresh functionality.
RefreshManager
Manages the auto-refresh background task and state.
RefreshMetadata
Metadata needed to reconstruct a request for auto-refresh.

Traits§

RefreshCallback
Callback trait for triggering refresh operations.

Type Aliases§

RefreshFuture
Future type for refresh operations.
RefreshResult
Result type for refresh operations.