Skip to main content

Decorator to cache async function results

Project description

Caching decorator for async functions

This is a replacement for @cached() decorator from cachetools. cachetools does not support async at the time of writing.


    pip install async-cached


    from cachetools import LRUCache
    from asynccached import asynccached

    _cache = LRUCache(maxsize=1)

    @asynccached(cache=_cache, key=lambda arg: arg)
    async def func(arg):

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for async-cached, version 3.11.2
Filename, size File type Python version Upload date Hashes
Filename, size async-cached-3.11.2.tar.gz (1.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page