cachetools core + redis
Project description
py-redis-cachetools
cachetools core + redis
Requirements:
redis 3.5.3
Installation:
pip install py-redis-cachetools
env variables:
REDIS_HOST
REDIS_DB
Usage:
import time
import cachetools, cachetools.rcache
# cache = cachetools.rcache.RedisCache(ttl=60)
cache = cachetools.rcache.PrefixedRedisCache("hb-cachetools-cache", ttl=60)
@cachetools.cached(cache=cache)
def test(a, b):
return {
'hi': 'hello'
}
a = 1
while True:
print(test(a, 2))
print(a)
time.sleep(1)
a = a+1
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-redis-cachetools-0.1.2.tar.gz.
File metadata
- Download URL: py-redis-cachetools-0.1.2.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-56-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
309dc6042b6e5174eae1c638a35cd940a96d856e9a703437ca00eb79967214b7
|
|
| MD5 |
d795af2e60009221ee2ba002082210ea
|
|
| BLAKE2b-256 |
dd98f61ff17ff2f2a52ea6660575f9c3f8b4dae11b827fa46e8c1cec217ca6a4
|
File details
Details for the file py_redis_cachetools-0.1.2-py3-none-any.whl.
File metadata
- Download URL: py_redis_cachetools-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-56-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a946d80f0428367afda2ad28ce4c9f9f5fd0c6348e4e44b0d6747b0072f8c12
|
|
| MD5 |
b5f804ae4161e882a9676f27821ac76e
|
|
| BLAKE2b-256 |
42606aa87753b12099a494901600e66dfc666766118e3deb3a802edfa9c3c6bd
|