cunla / fakeredis-py

Implementation of Redis API in python without having a server running. Fully compatible with using redis-py.
https://fakeredis.moransoftware.ca/
BSD 3-Clause "New" or "Revised" License
300 stars 49 forks source link

The documentation for adding `FakeRedis` as a cache backend in Django is outdated. #285

Closed ulmus closed 9 months ago

ulmus commented 9 months ago

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):

Additional context The correct setting should be CONNECTION_POOL_CLASS_KWARGS setting to {"connection_class": FakeConnection} Pull request here https://github.com/cunla/fakeredis-py/pull/284