Documentation

paths

Path management for Context-Fabric corpus cache.

This module provides utilities for managing the local cache directory where downloaded corpora are stored.

Functions

function
clear_cache(corpus_id: str | None = None) None

Clear downloaded corpus cache.

Clear downloaded corpus cache. Args: corpus_id: Specific corpus to clear, or None for all. Note: This only clears the cfabric-specific cache. To clear huggingface_hub cache, use their cache management. Note: This is a stub - full implementation requires huggingface_hub cache management integration.
Parameters
  • corpus_id: str | None= None
function
get_cache_dir() Path

Get the cfabric cache directory.

Get the cfabric cache directory. Resolution order: 1. CFABRIC_CACHE environment variable 2. Platform-specific cache directory via platformdirs Note: By default, huggingface_hub caches to ~/.cache/huggingface/ This function returns the cfabric-specific cache for any additional local data. Returns: Path to the cache directory. Example: >>> from cfabric.downloader import get_cache_dir >>> cache = get_cache_dir() >>> print(cache) /Users/username/.cache/cfabric