Skip to main content

Sanitize your keys, please.

Project description

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',
    }
}

Project details


Download files

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

Source Distribution

django-memcachedkeys-0.1.0.tar.gz (2.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page