MCPcopy
hub / github.com/HKUDS/DeepCode / cleanup_cache

Method cleanup_cache

cli/cli_interface.py:695–705  ·  view source on GitHub ↗

清理Python缓存文件 / Clean up Python cache files

(self)

Source from the content-addressed store, hash-verified

693 )
694
695 def cleanup_cache(self):
696 """清理Python缓存文件 / Clean up Python cache files"""
697 try:
698 self.print_status("Cleaning up cache files...", "info")
699 # 清理__pycache__目录
700 os.system('find . -type d -name "__pycache__" -exec rm -r {} + 2>/dev/null')
701 # 清理.pyc文件
702 os.system('find . -name "*.pyc" -delete 2>/dev/null')
703 self.print_status("Cache cleanup completed", "success")
704 except Exception as e:
705 self.print_status(f"Cache cleanup failed: {e}", "warning")
706
707 def print_goodbye(self):
708 """Print goodbye message"""

Callers 1

print_goodbyeMethod · 0.95

Calls 1

print_statusMethod · 0.95

Tested by

no test coverage detected