Skip to main content

lru_cache_pubsub_cache_clear

lru_cache_pubsub_cache_clear is a decorator to broadcast cache_clear() calls to lru_cache across multiple instances of an application. This allows for local cache access speed and redis-like centralized cache invalidation. Example:

from lru_cache_pubsub_cache_clear.decorators import lru_cache_pubsub_cache_clear
from django_redis import get_redis_connection


@lru_cache_pubsub_cache_clear(get_redis_connection=get_redis_connection,
                              channel_name='CHANNEL_CACHE_CLEAR')
@lru_cache(maxsize=1000000)
def get_data(key)
    ...
    return value

Here get_redis_connection is a callable which returns a redis connection (e.g. django_redis.get_redis_connection).

Then every time one of app instances calls get_data.cache_clear() it will be executed on all connected instances.

Metadata

Release files for lru-cache-pubsub-cache-clear 0.0.9

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

Source distribution (sdist)

Source distribution for lru-cache-pubsub-cache-clear 0.0.9
File Size Uploaded Provenance Actions
lru-cache-pubsub-cache-clear-0.0.9.tar.gz 1.9 kB Without provenance Details for lru-cache-pubsub-cache-clear-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lru-cache-pubsub-cache-clear 0.0.9
File Interpreter ABI Platform Actions
lru_cache_pubsub_cache_clear-0.0.9-py3-none-any.whl Python 3 none any Details for lru_cache_pubsub_cache_clear-0.0.9-py3-none-any.whl

Total release size: 5.5 kB

Release files / lru-cache-pubsub-cache-clear-0.0.9.tar.gz

Download URL lru-cache-pubsub-cache-clear-0.0.9.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7cbf37ec3d04f037803c8b3486d531e5e7c0db4bdd9181116beaed3540d74116
BLAKE2b-256 checksum
How to use checksums
e1f54b126ebf001182d24e48c78ccd0b956b77cd5f26a05c9b9d5d599837d1d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

Release files / lru_cache_pubsub_cache_clear-0.0.9-py3-none-any.whl

Download URL lru_cache_pubsub_cache_clear-0.0.9-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
482a2dc6e955b47bac3b5158ec1fab66b3074441645b6a27997a79606d0d6576
BLAKE2b-256 checksum
How to use checksums
fa7825656f42308f7eeec91b0adf6dc638f2e7581e076fe7e2cbeb77c08a995c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

Security for lru-cache-pubsub-cache-clear 0.0.9

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.

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