anchor.diff:  <redis.client.Redis object at 0x2dc4510>
   ----
   
  -WARNING: Not all plugable clients have support this feature.
  +WARNING: Not all pluggable clients support this feature.
   
   Connection pools
   ~~~~~~~~~~~~~~~~
   
  -django-redis, behind the scenes uses underlying redis-py connection pool implementation, and exposes a simple way to
  +Behind the scenes, *django-redis* uses the underlying *redis-py* connection pool implementation, and exposes a simple way to
   configure it or directly customize a connection/connection pool creation for backend.
   
  -The default redis-py behavior is not to close connections and recycle them when possible.
  +The default *redis-py* behavior is to not close connections, recycling them when possible.
   
   Configure default connection pool
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   
  -The default connection pool is simple. You only can customize the maximum number of connections
  -for the pool.
  -
  -You can do it, using **CONNECTION_POOL_KWARGS** parameter in settings CACHES:
  -
  -[source,python]
  +The default connection pool is simple. You can only customize the maximum number of connections
  +in the pool, by setting `CONNECTION_POOL_KWARGS` in the `CACHES` setting:
  +
  +[source, python]
   ----
   CACHES = {
  -    "default": {
  -        "BACKEND": "redis_cache.cache.RedisCache",
  +    'default': {
  +        'BACKEND': 'redis_cache.cache.RedisCache',
           ...
  -        "OPTIONS": {
  -            "CONNECTION_POOL_KWARGS": {"max_connections": 100}
  +        'OPTIONS': {
  +            'CONNECTION_POOL_KWARGS': {'max_connections': 100}
           }
       }
   }
  
positive.code: ----
  
  ._settings.py_
  [source,python]
  ----
  # Omiting all backend declaration for remove boilerplate code.
  
  "OPTIONS": {
      "CONNECTION_POOL_CLASS": "myproj.mypool.MyOwnPool"
  }
  ----
  
  Customize connection factory
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  
  If no one of the previously methods satisfies you, you can get in the middle of django-redis connection
  factory process and customize it or completely rewrite.
  
  django-redis by default creates connection throught `redis_cache.pool.ConnectionFactory` class that is specifid
  throught **DJANGO_REDIS_CONNECTION_FACTORY** global django setting.
  
  .Partial interface of `ConnectionFactory` class
  [source,python]
  ----
  # Note: using python3 notations for code documentation ;)
  
  class ConnectionFactory(object):
      def get_connection_pool(self, params:dict):
          # Given a connection parameters on `params` argument
          # return new connection pool.
          # It should be overwrited if you want do something
          # before/after create connection pool or return your
          # own connection pool.
          pass
  
      def get_connection(self, params:dict):
          # Given a connection parameters on `params` argument
          # return a new connection.
          # It should be overwrited if you want do something
          # before/after create new connection.
          # The default implementation uses `get_connection_pool`
          # for obtain a pool and create new connection from
          # newly obtained pool.
          pass
  
      def get_or_create_connection_pool(self, params:dict):
          # This is a high layer on top of get_connection_pool for
          # implement a cache of created connection pools.
          # You should reimplement it if you want change the default
          # behavior.
          pass
  
      def make_connection_params(self, host:str, port:int, db:int) -> dict:
          # The resposability of this function is conver basic connection
          # parameters and other settings to fully connection pool ready
          # connection parameters
          pass
  
      def connect(self, host:str, port:int, db:int):
          # This is a really public api and entry point of this
          # factory class. This encapsulates the main logic of creating
          # the previously mentioned `params` using a `make_connection_params`
          # and creating a new connection using `get_connection` method.
          pass
  ----
  
  Plugable parsers
  ~~~~~~~~~~~~~~~~
  
  redis-py (python redis client used by django-redis) comes with pure python redis parser that works very
  well for al most common task, but if you want some performance boost, you can use *hiredis*.
  
  *hiredis* is a redis client writen in C and it has it own parser that can be used with *django-redis*.
  
  [source, python]
  ----
  "OPTIONS": {
      "PARSER_CLASS": "redis.connection.HiredisParser",
  }
  ----
  
  
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*
  
  