write_cache

Function write_cache 

Source
pub fn write_cache<T: Serialize>(key: &str, entry: &CacheEntry<T>) -> Result<()>
Expand description

Write a cache entry to disk.

Creates parent directories if they don’t exist. Uses atomic write pattern (write to temp, rename) to prevent corruption.

§Arguments

  • key - Cache key (relative path within cache directory)
  • entry - Cache entry to write

§Errors

Returns an error if the file cannot be written.