The Python Cache Toolkit.
Project description
Cache Alchemy
The Python Cache Toolkit.
Free software: MIT license
Documentation: https://cache_alchemy.readthedocs.io/en/latest/
Installation
$ pipenv install cache_alchemy
✨🍰✨
Only Python 3.6+ is supported.
Example
from cache_alchemy import memory_cache, redis_cache
from cache_alchemy.config import DefaultConfig
from redis import StrictRedis
config = DefaultConfig()
config.client = StrictRedis.from_url(config.CACHE_ALCHEMY_REDIS_URL)
@memory_cache()
def add(i: complex, j: complex) -> complex:
return i + j
@redis_cache()
def add(i: int, j: int) -> int:
return i + j
Features
Cache Json Serializable function return value with Distributed Redis Cache
Cache any function return value with Distributed Memory Cache
TODO
History
0.1.0 (2019-09-11)
Init Project.
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
cache_alchemy-0.1.0.tar.gz
(13.7 kB
view hashes)
Built Distribution
Close
Hashes for cache_alchemy-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33442ed82ff075f675bec7ad8766c3bf5051299aa63de693e52772c808bd6158 |
|
MD5 | 292dab91f31ffdceb52e9fce52b201dd |
|
BLAKE2b-256 | 0fa5ffc931f435e841bf7a2e13e4952084c796baf2e2952ee7e5921eb31dc9ec |