epicserve / django-cache-url

Use Cache URLs in your Django Application
MIT License
18 stars 12 forks source link

Update redis backend support #26

Open Nagico opened 1 year ago

Nagico commented 1 year ago

feat:

fix:

# native django redis-py backend (Unchanged): 
BUILTIN_DJANGO_BACKEND = 'django.core.cache.backends.redis.RedisCache' 

# django-redis backend (Add a new variable)
DJANGO_REDIS_BACKEND = 'django_redis.cache.RedisCache'

# django-redis-cache (Unchanged): 
DJANGO_REDIS_CACHE_LIB_KEY = 'redis-cache'
DJANGO_REDIS_CACHE_BACKEND = 'redis_cache.RedisCache'

# default redis backend, depend on django version (Replace DJANGO_REDIS_BACKEND with DEFAULT_REDIS_BACKEND)
DEFAULT_REDIS_BACKEND = DJANGO_REDIS_BACKEND if VERSION[0] < 4 else BUILTIN_DJANGO_BACKEND

docs:


More information about available schemes of different redis backends