Skip to content

mikenerone/async-cache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-cache

info:A caching solution for asyncio
https://travis-ci.org/iamsinghrajat/async-cache.svg?branch=master

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.

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%