Memcached has some weird rules about its keys. Ignore them and you’ll get an error like “MemcachedKeyCharacterError: Control characters not allowed”. So install this.
Quickstart
Install django-memcachedkeys:
pip install django-memcachedkeys
Then use it in your settings file:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'KEY_PREFIX': 'whatever',
'KEY_FUNCTION': 'memcachedkeys.make_key',
}
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-memcachedkeys-0.1.0.tar.gz.
File metadata
- Download URL: django-memcachedkeys-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dce017ce7ea3665080cc84ab26fef93449802ebf4ca1a4f7d2e865f28d67358b
|
|
| MD5 |
4de52e2dc00b3aa948a5030986496c88
|
|
| BLAKE2b-256 |
9f9cf20c876d7dcef579254fbe24a7dccd99012544fa4173a2fdd36ad46ddaf5
|