-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path__init__.py
More file actions
30 lines (25 loc) · 805 Bytes
/
Copy path__init__.py
File metadata and controls
30 lines (25 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from .base import BaseCacheableClass
from .cache.in_memory import InMemoryCache, InMemoryCacheDecorator
from .interfaces import CacheDecoratorInterface, CacheInterface
from .models import CacheItem
__all__ = [
"BaseCacheableClass",
"CacheInterface",
"CacheDecoratorInterface",
"CacheItem",
"InMemoryCache",
"InMemoryCacheDecorator",
]
# Conditional export for Redis classes
try:
from .cache.redis import RedisCache, RedisCacheDecorator
__all__.extend(["RedisCache", "RedisCacheDecorator"])
except ImportError:
# Redis is optional
pass
try:
from .cache.valkey import ValkeyCache, ValkeyCacheDecorator, ValkeyClientConfig
__all__.extend(["ValkeyCache", "ValkeyCacheDecorator", "ValkeyClientConfig"])
except ImportError:
# Valkey is optional
pass