Skip to main content

pylibmc-sasl cache backend for Django

This package provides a memcached cache backend for Django using pylibmc. You want to use pylibmc because it’s fast.

This is a fork of the django-pylibmc package. These changes will eventually end up upstream.

Requirements

django-pylibmc-sasl requires Django 1.3. It was written and tested on Python 2.7.x.

Installation

Get it from pypi:

pip install django-pylibmc-sasl

Usage

Your cache backend should look something like this:

CACHES = {
    'default': {
        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
        'LOCATION': 'localhost:11211',
        'TIMEOUT': 500,
        'BINARY': True,
        'OPTIONS': {  # Maps to pylibmc "behaviors"
            'tcp_nodelay': True,
            'ketama': True
        }
    }
}

If you want to use the memcached binary protocol, set the BINARY key’s value to True as shown above. BINARY is False by default.

If you want to control pylibmc behaviors, use the OPTIONS. OPTIONS is an empty dict by default.

Pylibmc supports compression and the minimum size (in bytes) of values to compress can be set via the Django setting PYLIBMC_MIN_COMPRESS_LEN. The default is 0, which is disabled.

Caveats

This package breaks away from the current handling of timeout=0 in Django. Django converts 0 into the default timeout, while django-pylibmc leaves it as 0. memcached takes 0 to mean “infinite timeout.” You can still pass None to get the default timeout.

Release files for django-pylibmc-sasl 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-pylibmc-sasl 0.2.4
File Size Uploaded
django-pylibmc-sasl-0.2.4.tar.gz 4.5 kB Details

Release files / django-pylibmc-sasl-0.2.4.tar.gz

Download URL django-pylibmc-sasl-0.2.4.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
68515c7b8913ff1b73a80048f52f412df31674372d361ea4a7d17765933ba6d5
BLAKE2b-256 checksum
How to use checksums
2fc563d26212d06c3601c034de77e28b8b8f92a45f2e0ac70149c460c8a62165
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.4 This release

1 release file

0.2.3

1 release file

0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page