Skip to content

Commit

Permalink
update docs to latest django-redis version
Browse files Browse the repository at this point in the history
update

updates
  • Loading branch information
Aleck Landgraf committed Jun 14, 2016
1 parent 0600e0e commit e9f95f8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,22 @@ Now put something like this in your settings::
CACHES = {
'default': {
'BACKEND': 'redis_lock.django_cache.RedisCache',
'LOCATION': '127.0.0.1:6379',
'LOCATION': 'redis://127.0.0.1:6379/1',
'OPTIONS': {
'DB': 1
'CLIENT_CLASS': 'django_redis.client.DefaultClient'
}
}
}


.. note::


If using a `django-redis` < `3.8.x`, you'll probably need `redis_cache`
which has been deprecated in favor to `django_redis`. The `redis_cache`
module is removed in `django-redis` versions > `3.9.x`. See `django-redis notes <http://niwinz.github.io/django-redis/latest/#_configure_as_cache_backend>`_.


This backend just adds a convenient ``.lock(name, expire=None)`` function to django-redis's cache backend.

You would write your functions like this::
Expand Down

0 comments on commit e9f95f8

Please sign in to comment.