MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / purge

Function purge

aura/cache.py:494–506  ·  view source on GitHub ↗
(standard: bool=False)

Source from the content-addressed store, hash-verified

492
493
494def purge(standard: bool=False):
495 if Cache.DISABLE_CACHE:
496 return
497
498 mode = config.get_cache_mode()
499 if mode not in ("ask", "auto", "always"):
500 raise ValueError(f"Cache mode has invalid value in the configuration: '{mode}'")
501
502 if mode == "ask" and standard:
503 if click.confirm("Would you like to purge the cache?"):
504 CacheItem.cleanup()
505 elif (mode == "auto" and standard) or mode == "always":
506 CacheItem.cleanup()
507
508
509def get_expiration(category: str="default") -> datetime.timedelta:

Callers 4

scanFunction · 0.85
diffFunction · 0.85
infoFunction · 0.85
update_auraFunction · 0.85

Calls 1

cleanupMethod · 0.45

Tested by

no test coverage detected