Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Mar 15, 2023
1 parent bbed2f2 commit 16ef961
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/about/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Next release

## v2.10.0
### 🐛 Bug Fixes
- Enable testing django-cache using `FakeConnection`.

## v2.10.0
### 🚀 Features
- All geo commands implemented
Expand Down
21 changes: 21 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,27 @@ True
Fakeredis implements the same interface as `redis-py`, the popular
redis client for python, and models the responses of redis 6.x or 7.x.

### Use to test django cache

Update your cache settings:

```python
from fakeredis import FakeConnection

CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.redis.RedisCache',
'LOCATION': '...',
'OPTIONS': {
'connection_class': FakeConnection
}
}
}
```

You can use
django [`@override_settings` decorator](https://docs.djangoproject.com/en/4.1/topics/testing/tools/#django.test.override_settings)

### Use to test django-rq

There is a need to override `django_rq.queues.get_redis_connection` with
Expand Down

0 comments on commit 16ef961

Please sign in to comment.