cunla / fakeredis-py

Implementation of Redis in python without having a Redis server running. Fully compatible with using redis-py.

Home Page:https://fakeredis.moransoftware.ca/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. Try to add FakeRedis as cache backend by setting the CONNECTION_CLASS in "OPTIONS" to FakeConnection
  2. 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