# 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
Raw data
{
"_id": null,
"home_page": "https://500apps.com",
"name": "py-redis-cachetools",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "py-redis-cachetools",
"author": "500apps",
"author_email": "satyabrata.swain@500apps.com",
"download_url": "https://files.pythonhosted.org/packages/dd/98/f61ff17ff2f2a52ea6660575f9c3f8b4dae11b827fa46e8c1cec217ca6a4/py-redis-cachetools-0.1.2.tar.gz",
"platform": null,
"description": "# py-redis-cachetools\ncachetools core + redis\n\nRequirements:\n-------------\nredis 3.5.3\n\n\nInstallation:\n-------------\n\n pip install py-redis-cachetools\n\nenv variables:\n-------------\n REDIS_HOST\n REDIS_DB\n\n\nUsage:\n------\n\n import time\n import cachetools, cachetools.rcache\n\n\n # cache = cachetools.rcache.RedisCache(ttl=60)\n\n cache = cachetools.rcache.PrefixedRedisCache(\"hb-cachetools-cache\", ttl=60)\n\n\n @cachetools.cached(cache=cache)\n def test(a, b):\n return {\n 'hi': 'hello'\n }\n\n\n\n a = 1\n while True:\n print(test(a, 2))\n print(a)\n time.sleep(1)\n a = a+1",
"bugtrack_url": null,
"license": "",
"summary": "cachetools core + redis",
"version": "0.1.2",
"split_keywords": [
"py-redis-cachetools"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "42606aa87753b12099a494901600e66dfc666766118e3deb3a802edfa9c3c6bd",
"md5": "b5f804ae4161e882a9676f27821ac76e",
"sha256": "5a946d80f0428367afda2ad28ce4c9f9f5fd0c6348e4e44b0d6747b0072f8c12"
},
"downloads": -1,
"filename": "py_redis_cachetools-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b5f804ae4161e882a9676f27821ac76e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 9375,
"upload_time": "2023-01-05T10:34:56",
"upload_time_iso_8601": "2023-01-05T10:34:56.995534Z",
"url": "https://files.pythonhosted.org/packages/42/60/6aa87753b12099a494901600e66dfc666766118e3deb3a802edfa9c3c6bd/py_redis_cachetools-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dd98f61ff17ff2f2a52ea6660575f9c3f8b4dae11b827fa46e8c1cec217ca6a4",
"md5": "d795af2e60009221ee2ba002082210ea",
"sha256": "309dc6042b6e5174eae1c638a35cd940a96d856e9a703437ca00eb79967214b7"
},
"downloads": -1,
"filename": "py-redis-cachetools-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "d795af2e60009221ee2ba002082210ea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 8685,
"upload_time": "2023-01-05T10:34:55",
"upload_time_iso_8601": "2023-01-05T10:34:55.162346Z",
"url": "https://files.pythonhosted.org/packages/dd/98/f61ff17ff2f2a52ea6660575f9c3f8b4dae11b827fa46e8c1cec217ca6a4/py-redis-cachetools-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-05 10:34:55",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "py-redis-cachetools"
}