mirror of
https://github.com/Minidoracat/mcp-feedback-enhanced.git
synced 2025-07-26 10:02:25 +08:00
3.5 KiB
3.5 KiB
UV Cache Management Guide
🔍 Problem Description
Since this project uses uvx
for execution, cache files are created in the system with each run. Over time, these caches can consume significant disk space.
Cache Location
- Windows:
%USERPROFILE%\AppData\Local\uv\cache
- macOS/Linux:
~/.cache/uv
🧹 Cleanup Methods
Method 1: Using UV Built-in Commands (Recommended)
# Check cache location
uv cache dir
# Clean all cache
uv cache clean
Method 2: Using Project-Provided Cleanup Tool
# Check cache size
python scripts/cleanup_cache.py --size
# Preview cleanup content
python scripts/cleanup_cache.py --dry-run
# Execute cleanup
python scripts/cleanup_cache.py --clean
# Force cleanup (attempts to close related processes)
python scripts/cleanup_cache.py --force
⚠️ Common Issues
Issue: "File is being used by another process" error during cleanup
Cause: MCP server or other uvx processes are running
Solutions:
-
Close related processes:
- Close Claude Desktop or other MCP-using applications
- Terminate all
uvx
related processes
-
Use force cleanup:
python scripts/cleanup_cache.py --force
-
Manual cleanup:
# Windows taskkill /f /im uvx.exe taskkill /f /im python.exe /fi "WINDOWTITLE eq *mcp-feedback-enhanced*" # Then execute cleanup uv cache clean
Issue: Cache grows large again quickly after cleanup
Cause: Frequent use of uvx mcp-feedback-enhanced@latest
Recommendations:
- Regular cleanup: Recommend weekly or monthly cleanup
- Monitor size: Regularly check cache size
- Consider local installation: For developers, consider local installation instead of uvx
📊 Cache Size Monitoring
Check Cache Size
# Using cleanup tool
python scripts/cleanup_cache.py --size
# Or check directory size directly (Windows)
dir "%USERPROFILE%\AppData\Local\uv\cache" /s
# macOS/Linux
du -sh ~/.cache/uv
Recommended Cleanup Frequency
Cache Size | Recommended Action |
---|---|
< 100MB | No cleanup needed |
100MB-500MB | Consider cleanup |
> 500MB | Cleanup recommended |
> 1GB | Cleanup strongly recommended |
🔧 Automated Cleanup
Windows Scheduled Task
@echo off
cd /d "G:\github\interactive-feedback-mcp"
python scripts/cleanup_cache.py --clean
macOS/Linux Cron Job
# Weekly cleanup on Sunday
0 2 * * 0 cd /path/to/interactive-feedback-mcp && python scripts/cleanup_cache.py --clean
💡 Best Practices
- Regular monitoring: Check cache size monthly
- Timely cleanup: Clean when cache exceeds 500MB
- Close processes: Ensure related MCP services are closed before cleanup
- Backup important data: Ensure important projects are backed up before cleanup
🆘 Troubleshooting
Common Causes of Cleanup Failure
- Process occupation: MCP server is running
- Insufficient permissions: Administrator privileges required
- Disk errors: File system errors
Resolution Steps
- Close all MCP-related processes
- Run cleanup command as administrator
- If still failing, restart computer and try again
- Consider manually deleting parts of cache directory
📞 Support
If you encounter cleanup issues, please:
- Check the troubleshooting section in this document
- Report issues on GitHub Issues
- Provide error messages and system information