From 90f113a292f38fed6f0f61ddd637809a9fcc3abf Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 3 Jun 2025 16:31:16 +0800 Subject: [PATCH] remove ttl cache --- app/chain/torrents.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/chain/torrents.py b/app/chain/torrents.py index f0d59295..e8dbd315 100644 --- a/app/chain/torrents.py +++ b/app/chain/torrents.py @@ -3,8 +3,6 @@ import re import traceback from typing import Dict, List, Union, Optional -from cachetools import cached, TTLCache - from app.chain import ChainBase from app.chain.media import MediaChain from app.core.config import settings, global_vars @@ -90,7 +88,6 @@ class TorrentsChain(ChainBase, metaclass=Singleton): self.remove_cache(self._rss_file) logger.info(f'种子缓存数据清理完成') - @cached(cache=TTLCache(maxsize=64, ttl=300)) @memory_optimized(force_gc_after=True, log_memory=True) def browse(self, domain: str, keyword: Optional[str] = None, cat: Optional[str] = None, page: Optional[int] = 0) -> List[TorrentInfo]: @@ -108,7 +105,6 @@ class TorrentsChain(ChainBase, metaclass=Singleton): return [] return self.refresh_torrents(site=site, keyword=keyword, cat=cat, page=page) - @cached(cache=TTLCache(maxsize=64, ttl=180)) @memory_optimized(force_gc_after=True, log_memory=True) def rss(self, domain: str) -> List[TorrentInfo]: """