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 details)
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 mcache-1.0.0.tar.gz.
File metadata
- Download URL: mcache-1.0.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61278bd77c5b7ff72906496f382746f9e3b978522c532dd0ca949232b831d735
|
|
| MD5 |
da8e350fd37b6961be8b3d1ca831442d
|
|
| BLAKE2b-256 |
5552968f4ab7950059ee6b5c81764d2cfc05c51f33ba359da413fb6a39e6de29
|
File details
Details for the file mcache-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mcache-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03f6ca2dedb7e819747b557886224df0afb8c0b0abc2e7c49a1d0dddecae489d
|
|
| MD5 |
c40ffed4b4da0a3c46b51dc8aef72ef2
|
|
| BLAKE2b-256 |
b0cc87c3d1373ac339cbd5be3abbdc06d6cc6d2bef0200a52fa006eebf9572b1
|