Source code for stellium.utils.cache_utils

"""Cache utilities for easy access from within stellium package."""

from .cache import cache_info, cache_size, clear_cache






[docs] def clear_ephemeris_cache(): """Clear only the ephemeris cache.""" removed = clear_cache("ephemeris") print(f"🗑️ Cleared {removed} ephemeris cache files") return removed
[docs] def clear_geocoding_cache(): """Clear only the geocoding cache.""" removed = clear_cache("geocoding") print(f"🗑️ Cleared {removed} geocoding cache files") return removed
[docs] def clear_all_cache(): """Clear all cache files.""" removed = clear_cache() print(f"🗑️ Cleared {removed} total cache files") return removed
[docs] def get_cache_stats(): """Get cache statistics as a dictionary.""" return {"info": cache_info(), "sizes": cache_size()}