fix cache

This commit is contained in:
jxxghp
2025-06-27 15:24:57 +08:00
parent a2cc1a2926
commit 93eec6c4b8
5 changed files with 4 additions and 10 deletions

View File

@@ -84,7 +84,7 @@ class Plex:
logger.error(f"Authentication failed: {e}")
return None
@cached(maxsize=100, ttl=86400)
@cached(maxsize=32, ttl=86400)
def __get_library_images(self, library_key: str, mtype: int) -> Optional[List[str]]:
"""
获取媒体服务器最近添加的媒体的图片列表

View File

@@ -1,12 +1,9 @@
from app.core.cache import cached
from ..tmdb import TMDb
class Trending(TMDb):
_urls = {"trending": "/trending/%s/%s"}
@cached(maxsize=1024, ttl=43200)
def _trending(self, media_type="all", time_window="day", page=1):
"""
Get trending, TTLCache 12 hours