Skip to main content

django-infinite-memcached

A Django memcached backend to handle “infinite” timeouts (i.e., never expire an item).

Installation

  1. $ pip install django-infinite-memcached

  2. Set infinite_memcached.cache.MemcachedCache as your cache backend:

    CACHES = {
        "default": {
            "BACKEND": "infinite_memcached.cache.MemcachedCache",
            "LOCATION": "127.0.0.1:11211",
        },
    }

How to use

Either set the TIMEOUT option to 0:

CACHES = {
    "default": {
        "BACKEND": "infinite_memcached.cache.MemcachedCache",
        "LOCATION": "127.0.0.1:11211",
        "TIMEOUT": 0,
    },
}

Or pass timeout=0 to the low-level cache commands (e.g., set, add, etc.) to keep things from expiring.

Why?

Django’s default memcached backend doesn’t accept timeout values of zero, instead using the default timeout (five minutes) when zero is passed.

This cache backend overrides how timeouts are calculated so any timeout of zero is passed directly to memcached, telling memcached to never expire an item.

This has been an known issue for awhile, but concerns over backwards compatibility have prevented any fixes from taking place.

License

BSD. See LICENSE.txt.

Metadata

Release files for django-infinite-memcached 0.1

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-infinite-memcached 0.1
File Size Uploaded Provenance Actions
django-infinite-memcached-0.1.tar.gz 2.3 kB Without provenance Details for django-infinite-memcached-0.1.tar.gz

Release files / django-infinite-memcached-0.1.tar.gz

Download URL django-infinite-memcached-0.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
debdd1c611d3e0c1cdb806fde90e12b8c10b8183e5602da21a00a254ea557d7c
BLAKE2b-256 checksum
How to use checksums
42936dab288d659c62126018a001adb04aa67bca3f9c45ae07cd42258f2e73ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-infinite-memcached 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

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