native django redis-py, django-redis backend based on url connection: add USER field for authentication
native django redis-py, django-redis backend based on socket connection: add USER and PASSWORD field for authentication
django-redis-cache backend: throw exception when USER field is set
test_redis.py file: replace pytest.mark.skipif with pytest.fixture and mock, add conftest.py file which provides django_cache_url_dj3 and django_cache_url_dj4, two mocked modules as fixtures, for each test function.
fix:
native django redis-py backend: covert the keys in the OPTIONS to lower case
uniform redis backends name:
# 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:
readme.rst file: update redis, rediss, hiredis usage about authentication and native redis backend
More information about available schemes of different redis backends
feat:
native django redis-py
,django-redis
backend based on url connection: addUSER
field for authenticationnative django redis-py
,django-redis
backend based on socket connection: addUSER
andPASSWORD
field for authenticationdjango-redis-cache
backend: throw exception whenUSER
field is settest_redis.py
file: replace pytest.mark.skipif with pytest.fixture and mock, addconftest.py
file which providesdjango_cache_url_dj3
anddjango_cache_url_dj4
, two mocked modules as fixtures, for each test function.fix:
native django redis-py
backend: covert the keys in the OPTIONS to lower casedocs:
readme.rst
file: updateredis
,rediss
,hiredis
usage about authentication and native redis backendMore information about available schemes of different redis backends