class
DocMachine::Cache::Policy
- DocMachine::Cache::Policy
- Reference
- Object
Overview
Policy encapsulates cache root and derived paths. This keeps cache layout separate from runtime execution logic.
Defined in:
cache/policy.crConstructors
-
.new(cache_root : Path)
Store cache root once to avoid recomputing path logic.
Instance Method Summary
-
#cache_directory : Path
Cache directory is the root of all cache artifacts.
-
#cache_file_path : Path
Cache file path follows the legacy single-tarball layout.
- #cache_root : Path
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.