This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A Memcached Pool for Django

Project Description
django-memcached-pool
=====================

**This is a maintained version of Mozilla django-memcached-pool**

An efficient fast Django Memcached backend with a pool of connectors, based on
ultramemcache.

See https://github.com/esnme/ultramemcache

Each connection added in the pool stays connected to Memcache or Membase,
drastically limiting the number of reconnections and open sockets your
application will use on high load.

If you configure more than one Memcache server, each new connection
will randomly pick one.

Everytime a socket timeout occurs on a server, it's blacklisted so
new connections avoid picking it for a while.

To use this backend, make sure the package is installed in your environment
then use `memcachepool.cache.UMemcacheCache` as backend in your settings.

**Also, make sure you use umemcache >= 1.5**

Here's an example::


CACHES = {
'default': {
'BACKEND': 'memcachepool.cache.UMemcacheCache',
'LOCATION': '127.0.0.1:11211',
'OPTIONS': {
'MAX_POOL_SIZE': 100,
'BLACKLIST_TIME': 20,
'SOCKET_TIMEOUT': 5,
'MAX_ITEM_SIZE': 1000*100,
}
}
}


Options:

- **MAX_POOL_SIZE:** -- The maximum number of connectors in the pool. default: 35.
- **BLACKLIST_TIME** -- The time in seconds a server stays in the blacklist. default: 60
- **SOCKET_TIMEOUT** -- the time in seconds for the socket timeout. default: 4
- **MAX_ITEM_SIZE** -- The maximum size for an item in Memcache.



2016-08-24 - 0.6
################

- rename _get_memcache_timeout to get_backend_timeout for Django >1.9
- add function bug fix

2013-12-13 - 0.4
################

- Use pickle.HIGHEST_PROTOCOL #8
-
.....

2012-10-05 - 0.3.1
##################

- fixed cache.clear
- make sure timeout=0 is treated as infinite


2012-10-05 - 0.3
################

- now based on umemcache 0.5
- added support for MAX_ITEM_SIZE

2012-09-07 - 0.2
################

- Added the licence info

2012-08-28 - 0.1
################

- Initial release
Release History

Release History

This version
History Node

0.6

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-memcached-pool-gto-0.6.tar.gz (7.0 kB) Copy SHA256 Checksum SHA256 Source Aug 26, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting