Manages caching of consensus analysis results
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
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
CacheManager$new(cache_dir = NULL)
get_cache_dir()Get actual cache directory path
CacheManager$get_cache_dir()
generate_key()Generate cache key from input parameters (improved version)
CacheManager$generate_key(
input,
models,
cluster_id,
tissue_name = "",
top_gene_count = 10
)
save_to_cache()Save results to cache
CacheManager$save_to_cache(key, data)
load_from_cache()Load results from cache
CacheManager$load_from_cache(key)
has_cache()Check if results exist in cache
CacheManager$has_cache(key)
get_cache_stats()Get cache statistics
CacheManager$get_cache_stats()
clear_cache()Clear all cache
CacheManager$clear_cache(confirm = FALSE)
validate_cache()Validate cache content Extract genes from input in a standardized way 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
CacheManager$validate_cache(key)
clone()The objects of this class are cloneable with this method.
CacheManager$clone(deep = FALSE)deepWhether to make a deep clone.