class
Bakelite::Transform::Cache
- Bakelite::Transform::Cache
- Reference
- Object
Overview
Content-addressable cache manager for compile-time asset transformations.
Caches the results of expensive external tool executions in .bakelite/cache/
keyed by SHA256(file_content + command_string), eliminating repeated process invocations.
Defined in:
bakelite/transform/cache.crConstructors
Instance Method Summary
- #cache_dir : Path
-
#cache_file_path(key : String) : Path
Full path to the cache entry file.
-
#clear : Nil
Clears all entries in the cache directory.
-
#compute_key(input_data : Bytes | String, command : String) : String
Computes a deterministic cache key from input bytes and transform command string.
-
#get?(key : String) : Bytes | Nil
Retrieves cached output bytes, returning nil on cache miss.
-
#has_key?(key : String) : Bool
Checks if a transformed result exists in cache.
-
#put(key : String, data : Bytes | String) : Nil
Stores transformed output bytes into cache.
Constructor Detail
Instance Method Detail
def compute_key(input_data : Bytes | String, command : String) : String
#
Computes a deterministic cache key from input bytes and transform command string.