Function init_cache

Source
pub fn init_cache(
    cache_storage_file: &Path,
    policy: CachePolicy,
) -> Arc<DriveCache>
Expand description

Initializes only the cache middleware with a file-based data store.

This function creates a new DriveCache instance backed by a DataStore file.

§Arguments

  • cache_storage_file - Path to the file where cached responses are stored.
  • policy - The cache expiration policy.

§Returns

An Arc<DriveCache> instance managing the cache.