      >>> cache.get('my_key', 'has expired')
      'has expired'
  
  There's also a get_many() interface that only hits the cache once. get_many()
  returns a dictionary with all the keys you asked for that actually exist in the
  cache (and haven't expired)::
  
      >>> cache.set('a', 1)
      >>> cache.set('b', 2)
 
</s>
To add a key only if it doesn't already exist, there is an add() method.  It
takes the same parameters as set(), but will not attempt to update the cache
if the key specified is already present::

    >>> cache.set('add_key', 'Initial value')
    >>> cache.add('add_key', 'New value')
    >>> cache.get('add_key')
    'Initial value'

      >>> cache.get('my_key', 'has expired')
      'has expired'
  
To add a key only if it doesn't already exist, there is an add() method.  It
takes the same parameters as set(), but will not attempt to update the cache
if the key specified is already present::

    >>> cache.set('add_key', 'Initial value')
    >>> cache.add('add_key', 'New value')
    >>> cache.get('add_key')
    'Initial value'

  There's also a get_many() interface that only hits the cache once. get_many()
  returns a dictionary with all the keys you asked for that actually exist in the
  cache (and haven't expired)::
  
      >>> cache.set('a', 1)
      >>> cache.set('b', 2)
keep keep add keep keep keep keep keep keep
 Fixed #4831 -- Added an "add" cache key method, for parity with memcached's
API. This works for all cache backends. Patch from Matt McClanahan.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
docs/cache.txt