Skip to main content

An asyncio Cache

Project description

info:

A caching solution for asyncio

https://travis-ci.org/iamsinghrajat/async-cache.svg?branch=master https://img.shields.io/pypi/v/async-cache.svg

Installation

pip install async-cache

Basic Usage

# LRU Cache
from cache import AsyncLRU

@AsyncLRU(maxsize=128)
async def func(*args, **kwargs):
    pass


# TTL Cache
from cache import AsyncTTL

@AsyncTTL(time_to_live=60, min_cleanup_interval=60)
async def func(*args, **kwargs):
    pass

Supports primitive as well as non-primitive function parameter.

Currently TTL & LRU cache is supported.

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

async-cache-1.0.1.tar.gz (2.9 kB view hashes)

Uploaded Source

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