feat(cache): 同步/异步函数可共享缓存

- 缓存键支持自定义命名,使异步与同步函数可共享缓存结果
- 内存缓存改为类变量,实现多个cache装饰器共享同一缓存空间
- 重构AsyncMemoryBackend,减少重复代码
- 补齐部分模块的缓存清理功能
This commit is contained in:
景大侠
2026-02-10 18:46:49 +08:00
parent ba7b6ba869
commit 4c3d47f1f0
10 changed files with 100 additions and 100 deletions
+3
View File
@@ -1625,6 +1625,9 @@ class TmdbApi:
"""
清除缓存
"""
self.match_web.cache_clear()
self.discover.discover_movies.cache_clear()
self.discover.discover_tv_shows.cache_clear()
self.tmdb.cache_clear()
# 私有异步方法