anchor.diff:  }
   ----
   
  +
   Infinite timeout
   ~~~~~~~~~~~~~~~~
   
  
positive.code: >>> from django.core.cache import cache
  >>> cache.delete_pattern('foo_*')
  ----
  
  Redis native commands
  ~~~~~~~~~~~~~~~~~~~~~
  
negative.code: cache.set('key', 'value', timeout=None)
  ----
  
  
  Get ttl (time-to-live) from key
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  With redis, you can access to ttl of any stored key, for it, django-redis exposes `ttl` function.
  
  It returns:
  
  - ttl value for any volatile key (any key that has expiration)
  - 0 for expired and not existent keys
  - None for keys that does not have expiration
  
  .Simple search keys by pattern
  [source,pycon]
  ----
  >>> from django.core.cache import cache
  >>> cache.set('foo', 'value', timeout=25)
  >>> cache.ttl('foo')
  25
  >>> cache.ttl('not-existent')
  0
  ----
  
  
  Scan & Delete keys in bulk
  ~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  *django-redis* comes with some additions methods that hels for search or delete keys
  using glob patterns.
  
  .Simple search keys by pattern
  [source,pycon]
  ----
  >>> from django.core.cache import cache
  >>> cache.keys('foo_*')
  ['foo_1', 'foo_2']
  ----
  
  On simple, search it return all matched values, in databases with big amount of keys
  this isn't suitable method. For it, you can use `iter_keys` function that works like 
  `keys` function but uses redis>=2.8 server side cursors.
  
  .Search using server side cursors
  [source,pycon]
  ----
  >>> from django.core.cache import cache
  >>> cache.iter_keys('foo_*')
  <generator object algo at 0x7ffa9c2713a8>
  >>> next(cache.iter_keys('foo_*'))
  "foo_1"
  ----
  
  For delete keys, you should use `delete_pattern` that has the same glob pattern syntax
  like `keys` function and returns a number of deleted keys.
  
  .Example use of delete_pattern
  [source, python]
  