Skip to main content

Requirements

  • Python 3.6+

Installation & Upgrade

pip install backbone-redis-cache

Usage

from basalam.backbone_redis_cache import RedisCache
from redis.asyncio import Redis


cache = RedisCache(
    connection=Redis(host="127.0.0.1", port=6379),
    prefix="ORDER_CACHE."
)

await cache.set("key", "value", seconds=10 * 60)
await cache.get("key", default="Nevermind")

await cache.mset({'key1': "value1",'key2': "value2"}, seconds=15 * 60)
await cache.mget(["key1", "key2"], default="Whatever")

# Counter Manipulation
await cache.cset("key", 1, seconds=60)
await cache.cget("key")

await cache.exists("key")
await cache.forget("key")

await cache.flush()

Testing

# install pytest
pip install pytest

# run tests
python -m pytest

Changelog

Metadata

Release files for basalam.backbone-redis-cache 0.0.15

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

Source distribution (sdist)

Source distribution for basalam.backbone-redis-cache 0.0.15
File Size Uploaded
basalam_backbone_redis_cache-0.0.15.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for basalam.backbone-redis-cache 0.0.15
File Interpreter ABI Platform
basalam_backbone_redis_cache-0.0.15-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / basalam_backbone_redis_cache-0.0.15.tar.gz

Download URL basalam_backbone_redis_cache-0.0.15.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e86b2d96ab1f4f47f2ae4a52c73c9e9d60743aeb775a1c7db91bc044170d9a24
BLAKE2b-256 checksum
How to use checksums
791633328ec5e462600c44aa207c6ad8811295e4de943212f04dad2ec0d8b97b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / basalam_backbone_redis_cache-0.0.15-py3-none-any.whl

Download URL basalam_backbone_redis_cache-0.0.15-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6870ab90038364e709f90451ff4d64fd515c318a06efae40da30c1d167f51ee
BLAKE2b-256 checksum
How to use checksums
6d60dd1314437ef945871950bb8bc89e04cddcef1d305b89ddcf15a87cf1b41b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.0.15 This release

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

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