Skip to main content

read_cache

Function read_cache 

Source
pub fn read_cache(
    workspace_dir: &Path,
) -> Result<Option<WorkspaceIndexStatus>, WorkspaceError>
Expand description

Read the aggregate status cache for workspace_dir.

Returns:

  • Ok(Some(status)) if the cache file exists and was last modified within CACHE_TTL.
  • Ok(None) if the file is absent, older than the TTL, or has an unreadable mtime (caller treats all three as soft-misses).

ยงErrors

Returns WorkspaceError::Io for filesystem failures other than NotFound, and WorkspaceError::Serialization when the file is present but not parseable as a WorkspaceIndexStatus.