Manages caching of consensus analysis results
Public fields
cache_dirDirectory to store cache files. Options:
NULL (default): Uses system cache directory
"local": Uses .mllmcelltype_cache in current directory
"temp": Uses temporary directory
Custom path: Any other string is used as directory path
cache_versionCurrent cache version
Methods
Method new()
Initialize cache manager
NULL (default): Uses system cache directory via
tools::R_user_dir()"local": Uses .mllmcelltype_cache in current directory
"temp": Uses temporary directory (cleared on R restart)
Custom path: Any other string is used as directory path
Usage
CacheManager$new(cache_dir = NULL)Method generate_key()
Generate cache key from input parameters (improved version)
Method validate_cache()
Validate cache content
Arguments
keyValid cache key Return deterministic paths for regular RDS cache files Resolve a validated cache key to a path inside the cache directory Write one R object to a path; separated for deterministic failure testing Persist cache data through a same-directory temporary file Create stable hash from genes list Create stable hash from models list Create stable hash from tissue_name and top_gene_count Create stable hash from cluster ID