fix(cache): support clear image cache

This commit is contained in:
InfinityPacer
2024-10-20 01:05:06 +08:00
parent c6febe4755
commit 2c8ecdfcb9
3 changed files with 17 additions and 8 deletions

View File

@@ -64,10 +64,12 @@ def stop_frontend():
def clear_temp():
"""
清理临时目录中3天前的文件
清理临时文件和图片缓存
"""
# 清理3天前的文件
# 清理临时目录中3天前的文件
SystemUtils.clear(settings.TEMP_PATH, days=3)
# 清理图片缓存目录中7天前的文件
SystemUtils.clear(settings.CACHE_PATH / "images", days=7)
def check_auth():