Aerospike Django Cache Backend |
A cache backend for Django using the Aerospike key-value store server.
* compatible with aerospike native support for int/str/list/dict and pickling for all the rest of data types.
* "clear" is dependent on a bug fix from c client library and will be updated once its released in publicly available c/python client library. This will fail some of the tests which have dependency on clear api.
- first release.
This cache backend requires the python-client Python client library for communicating with the Aerospike server.
You can install aerospike python client library it by following instruction install-python-client.
- Run
python setup.py install
to install, or placeaerospike_cache
on your Python path. - Modify your Django settings to use
aerospike_cache
:
On Django < 1.3:
CACHE_BACKEND = 'aerospike_cache.cache://<host>:<port>'
On Django >= 1.3:
# The OPTIONS are optional and needed if you need to override the default, username/password are only required for enterprise edition.
CACHES = {
'default': {
'BACKEND': 'aerospike_cache.AerospikeCache',
'LOCATION': '<host>:<port>',
'OPTIONS': {# optional
'NAMESPACE': "test",
'SET': "cache",
'BIN': "entry",
'USERNAME': "username",
'PASSWORD': "password",
},
},
}