Merge pull request #42 from axibayuit-a11y/main

feat: 支持缓存超时设置为-1表示永不自动删除
This commit is contained in:
TheSmallHanCat
2025-12-24 19:39:58 +08:00
committed by GitHub
4 changed files with 18 additions and 8 deletions

View File

@@ -62,6 +62,10 @@ class FileCache:
async def _cleanup_expired_files(self):
"""Remove expired cache files"""
try:
# Skip cleanup if timeout is -1 (never delete)
if self.default_timeout == -1:
return
current_time = time.time()
removed_count = 0