统一使用 app.core.cache 中的 TTLCache

This commit is contained in:
jxxghp
2025-08-20 12:43:30 +08:00
parent 843dfc430a
commit 5b0bb19717
4 changed files with 102 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ from datetime import datetime
from typing import Any, Literal, Optional, List, Dict, Union
from typing import Callable
from cachetools import TTLCache
from app.core.cache import TTLCache
from jinja2 import Template
from app.core.config import global_vars

View File

@@ -10,10 +10,10 @@ from app.core.event import eventmanager, Event
from app.log import logger
from app.schemas import ConfigChangeEventData
from app.schemas.types import EventType
from app.utils.singleton import SingletonClass
from app.utils.singleton import Singleton
class RedisHelper(metaclass=SingletonClass):
class RedisHelper(metaclass=Singleton):
"""
Redis连接和操作助手类