Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mozilla/django-memcached-pool
INACTIVE - http://mzl.la/ghe-archive - A Pooled memcached connector for Django
https://github.com/mozilla/django-memcached-pool
inactive unmaintained
Last synced: about 2 months ago
JSON representation
INACTIVE - http://mzl.la/ghe-archive - A Pooled memcached connector for Django
- Host: GitHub
- URL: https://github.com/mozilla/django-memcached-pool
- Owner: mozilla
- License: other
- Archived: true
- Created: 2012-08-01T18:31:23.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2019-03-29T04:47:54.000Z (over 5 years ago)
- Last Synced: 2024-09-21T06:05:06.917Z (about 2 months ago)
- Topics: inactive, unmaintained
- Language: Python
- Size: 150 KB
- Stars: 75
- Watchers: 23
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
Awesome Lists containing this project
README
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.