Ticket #16886: memcached_socket_doc.diff

File memcached_socket_doc.diff, 1.4 KB (added by Daniel D. Beck, 13 years ago)
  • docs/topics/cache.txt

     
    100100      on your chosen memcached binding)
    101101
    102102    * Set :setting:`LOCATION <CACHES-LOCATION>` to ``ip:port`` values,
    103       where ``ip`` is the IP address of the Memcached daemon and
    104       ``port`` is the port on which Memcached is running.
     103      where ``ip`` is the IP address of the Memcached daemon and ``port`` is the
     104      port on which Memcached is running, or to a ``unix:path`` value, where
     105      ``path`` is the path to a Memcached Unix socket file.
    105106
    106107In this example, Memcached is running on localhost (127.0.0.1) port 11211, using
    107108the ``python-memcached`` binding::
     
    113114        }
    114115    }
    115116
     117In this example, Memcached is available through a local Unix socket file
     118:file:`/tmp/memcached.sock` using the ``python-memcached`` binding::
     119
     120    CACHES = {
     121        'default': {
     122            'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
     123            'LOCATION': 'unix:/tmp/memcached.sock',
     124        }
     125    }
     126
    116127One excellent feature of Memcached is its ability to share cache over multiple
    117128servers. This means you can run Memcached daemons on multiple machines, and the
    118129program will treat the group of machines as a *single* cache, without the need
Back to Top