Skip to main content

Async ready Multi Caching Library.

Project description

Async ready Multi Cache Library

codecov GitHub license PyPI - Status

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


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)

Uploaded Source

Built Distribution

mcache-1.0.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

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

Hashes for mcache-1.0.0.tar.gz
Algorithm Hash digest
SHA256 61278bd77c5b7ff72906496f382746f9e3b978522c532dd0ca949232b831d735
MD5 da8e350fd37b6961be8b3d1ca831442d
BLAKE2b-256 5552968f4ab7950059ee6b5c81764d2cfc05c51f33ba359da413fb6a39e6de29

See more details on using hashes here.

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

Hashes for mcache-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03f6ca2dedb7e819747b557886224df0afb8c0b0abc2e7c49a1d0dddecae489d
MD5 c40ffed4b4da0a3c46b51dc8aef72ef2
BLAKE2b-256 b0cc87c3d1373ac339cbd5be3abbdc06d6cc6d2bef0200a52fa006eebf9572b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page