mirror of
https://github.com/TheSmallHanCat/sora2api.git
synced 2026-02-13 09:06:10 +08:00
Merge pull request #42 from axibayuit-a11y/main
feat: 支持缓存超时设置为-1表示永不自动删除
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user