anchor.diff:  Configure as cache backend
   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   
  -For start using *django-redis*, you should change your django cache settings to something
  -like this:
  +To start using *django-redis*, you should change your Django cache settings to something like:
   
   [source, python]
   ----
   CACHES = {
  -    "default": {
  -        "BACKEND": "redis_cache.cache.RedisCache",
  -        "LOCATION": "127.0.0.1:6379:1",
  -        "OPTIONS": {
  -            "CLIENT_CLASS": "redis_cache.client.DefaultClient",
  -            "PASSWORD": "secretpassword", # Optional
  +    'default': {
  +        'BACKEND': 'redis_cache.cache.RedisCache',
  +        'LOCATION': '127.0.0.1:6379:1',
  +        'OPTIONS': {
  +            'CLIENT_CLASS': 'redis_cache.client.DefaultClient',
  +            'PASSWORD': 'secretpassword',  # Optional
           }
       }
   }
   ----
   
  -On this example, we are using standard TCP/IP sockets connection to localhost redis and using database 1.
  -In `OPTIONS`, we have especified the plugable client that we want use; in this case the default. You can ommit
  -this part because that client is used by default if no one is specified.
  -
  -NOTE: If you want use unix sockets, change the `LOCATION` value to something like `"unix:/path/to/socket:1"`.
  +In this example, we are using a standard TCP/IP socket connection to Redis running at `localhost`, using database 1.
  +In `OPTIONS`, we have specified the pluggable client we want to use; in this case the default one. You can omit
  +this part since that client is used by default if one is not specified.
  +
  +NOTE: If you want use Unix sockets, change the `LOCATION` value to something like `"unix:/path/to/socket:1"`.
   
   
   Configure as session backend
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   
  -Django, by default can use any cache backend as session backend and you can take profit of it using *django-redis*
  -as backend for session storage whithout installing any additional and unnecesary backends:
  -
  -[source, python]
  -----
  -SESSION_ENGINE = "django.contrib.sessions.backends.cache"
  -SESSION_CACHE_ALIAS = "default"
  +Django can by default use any cache backend as session backend and you benefit from that by using *django-redis*
  +as backend for session storage without installing any additional and unnecesary backends:
  +
  +[source, python]
  +----
  +SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
  +SESSION_CACHE_ALIAS = 'default'
   ----
   
   
  
positive.code: Additional methods
  ~~~~~~~~~~~~~~~~~~
  
  *django-redis* comes with some additions to the default django backend interface with two new methods:
  
  - `keys(wildcard_pattern)`: Retrieve keys matching glob pattern.
  - `delete_pattern(wildcard_pattern)`: Remove keys matching glob pattern.
  
negative.code: Introduction
  ------------
  
  _django-redis_ is a xref:license[BSD Licensed], full featured Redis cache/session backend for Django.
  
  
  Why use django-redis?
  ---------------------
  
  Because:
  
  - In active development.
  - Modular client system (pluggable clients).
  - Master-Slave support in the default client.
  - Complete battery of tests.
  - Used in production in several projects as cache and session storage.
  - Supports infinite timeouts.
  - Python 3 support in same code base.
  - Wide range of Django version support: 1.3-1.7
  - Facilities for raw access to Redis client/connection pool.
  - Highly configurable (can emulate memcached exception behavior, for example).
  - Unix sockets supported by default.
  - Pluggable parsers.
  
  
  How to install?
  ---------------
  
  The simplest way to use *django-redis* in your project is to install it with *pip*:
  
  [source,text]
  ----
  pip install django-redis
  ----
  
  Latest stable version: *3.6.1*
  
  Previous stable version: *3.5.2*
  
  