Files
MoviePilot/app/sdk/cache.py
DDSRem 2de976f6b3 Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
docs: 统一全项目中文注释和结构化契约说明
2026-10-17 19:26:29 +08:00

48 lines
990 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
插件可用的缓存契约、适配器工厂和装饰器。
"""
from app.adapters.cache.backends import (
AsyncFileBackend,
FileBackend,
)
from app.runtime.cache import (
AsyncCache,
AsyncCacheBackend,
AsyncFileCache,
AsyncMemoryBackend,
AtomicCacheBackend,
Cache,
CacheBackend,
FileCache,
LRUCache,
MemoryBackend,
TTLCache,
async_fresh,
cached,
fresh,
is_fresh,
)
# RedisBackend / AsyncRedisBackend 由兼容层惰性解析到 app.adapters.cache.redis,显式导入仍可用;
# 不列入星号导出,避免文件缓存实例因 ``import *`` 加载 redis 客户端库。
__all__ = [
"AtomicCacheBackend",
"AsyncCache",
"AsyncCacheBackend",
"AsyncFileBackend",
"AsyncFileCache",
"AsyncMemoryBackend",
"Cache",
"CacheBackend",
"FileBackend",
"FileCache",
"LRUCache",
"MemoryBackend",
"TTLCache",
"async_fresh",
"cached",
"fresh",
"is_fresh",
]