class DocMachine::Cache::Policy

Overview

Policy encapsulates cache root and derived paths. This keeps cache layout separate from runtime execution logic.

Defined in:

cache/policy.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(cache_root : Path) #

Store cache root once to avoid recomputing path logic. Immutable storage ensures a consistent cache layout for a run.


Instance Method Detail

def cache_directory : Path #

Cache directory is the root of all cache artifacts. Keeping this as a method supports future layout changes.


def cache_file_path : Path #

Cache file path follows the legacy single-tarball layout. This preserves behavior while allowing later namespacing.


def cache_root : Path #