Skip to content

Support for behaviors of pylibmc #351

Open
@cic79

Description

I am using django-environ and pylibmc as backend.
It would be nice to be able to set behaviors directly in the env.
Something like:
CACHE_URL=pymemcache://127.0.0.1:11211?TIMEOUT=6000&BEHAVIOR:ketama=1&BEHAVIOR:remove_failed=1&BEHAVIOR:retry_timeout=1&BEHAVIOR:dead_timeout=60

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
        'LOCATION': '127.0.0.1:11211',
        'TIMEOUT': 6000,
        'OPTIONS': {
            'behaviors': {
                'ketama': 1,
                'remove_failed': 1,
                'retry_timeout': 1,
                'dead_timeout': 60
            }
        }
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions