Skip to main content

Redis Cache Decorator

Installation

pip install redis-cache-deco

Example

from datetime import datetime
import redis
from redis_cache_deco import rcd

rcd.init_redis_cache(redis.Redis(host='localhost', port=6379, db=0))

@rcd.use_redis_cache(ttl=60)
def my_function(dt,array):
    print("My Function")
    return {"dt":dt,"array":array,"ret":"OK"}

res=my_function(datetime(2021,1,1,1,1),[{"a":1}])
print(res)


rcd.cache_stats()

parameters

init_redis_cache(redis_client_in,prefix_in="",debug_in=False)

  • prefix_in: The prefix to use in redis
  • debug_in: Bypass the redis cache

Metadata

Release files for redis-cache-deco 1.0.8

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

Source distribution (sdist)

Source distribution for redis-cache-deco 1.0.8
File Size Uploaded Provenance Actions
redis_cache_deco-1.0.8.tar.gz 6.5 kB Without provenance Details for redis_cache_deco-1.0.8.tar.gz

Release files / redis_cache_deco-1.0.8.tar.gz

Download URL redis_cache_deco-1.0.8.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
66316e1097ad2ab1a2f882dc51253b9632fbc17730558eea8b88e62d0541c3e5
BLAKE2b-256 checksum
How to use checksums
6a7e3cf56943aa3f318fbfe944415c5764056df55d39e6862a8c4abdc291c4a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

Security for redis-cache-deco 1.0.8

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