Manages caching of consensus analysis results
Public fields
cache_dir
Directory to store cache files
cache_version
Current cache version
Methods
Method new()
Initialize cache manager
Arguments
cache_dir
Directory to store cache files
Method generate_key()
Generate cache key from input parameters
Usage
CacheManager$generate_key(input, models, cluster_id)
Arguments
input
Input data
models
Models used
cluster_id
Cluster ID
Method save_to_cache()
Save results to cache
Usage
CacheManager$save_to_cache(key, data)
Arguments
key
Cache key
data
Data to cache
Method load_from_cache()
Load results from cache
Usage
CacheManager$load_from_cache(key)
Returns
Cached data if exists, NULL otherwise
Method has_cache()
Check if results exist in cache
Usage
CacheManager$has_cache(key)
Returns
TRUE if cached results exist
Method get_cache_stats()
Get cache statistics
Usage
CacheManager$get_cache_stats()
Returns
A list with cache statistics
Method clear_cache()
Clear all cache
Usage
CacheManager$clear_cache(confirm = FALSE)
Arguments
confirm
Boolean, if TRUE, will clear cache without confirmation
Method validate_cache()
Validate cache content
Usage
CacheManager$validate_cache(key)
Returns
TRUE if cache is valid, FALSE otherwise
Method clone()
The objects of this class are cloneable with this method.
Usage
CacheManager$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.