Async ready Multi Caching Library.
Project description
Async ready Multi Cache Library
A python package to use a async ready decorator for caching outputs.
Currently supported cache stores:
- Filecache
- Memcached
Requirements
- memcached
On osx
brew install memcached
brew services start memcached
On Linux
sudo apt-get -y install memcached libmemcached-tools
sudo systemctl enable memcached
sudo systemctl start memcached
Installing the package
pip install mcache
Using it in your application
from mcache import filecache, DAY
@filecache(lifetime=DAY*2)
def add(x):
return x+4
print(add(10))
Async
import asyncio
from mcache import filecache, DAY
@filecache(lifetime=DAY*2)
async def add(x):
return x+4
print(asyncio.run(add(10)))
Sriram
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
mcache-1.0.0.tar.gz
(5.8 kB
view hashes)
Built Distribution
mcache-1.0.0-py3-none-any.whl
(8.0 kB
view hashes)