The documentation for adding `FakeRedis` as a cache backend in Django is outdated.
ulmus opened this issue · comments
Describe the bug
The documentation for adding FakeRedis
as a cache backend in Django is outdated.
To Reproduce
Steps to reproduce the behavior:
- Try to add
FakeRedis
as cache backend by setting theCONNECTION_CLASS
in"OPTIONS"
toFakeConnection
- The connection fails, because the
FakeConnection
is never initialized
Expected behavior
FakeRedis
should have been used instead of ordinary Redis for the Django cache
Screenshots
None
Desktop (please complete the following information):
- OS: macOS
- python version: 3.8
- redis-py version: 5.0.1
- django version: 3.2.20
- django-redis version: 5.4.0
- full requirements.txt?: Can't disclose
Additional context
The correct setting should be CONNECTION_POOL_CLASS_KWARGS
setting to {"connection_class": FakeConnection}
Pull request here #284