Skip to main content

Helpers to use cachetools with async functions

Project description

# asyncache

Helpers to use cachetools with asyncio.

[![Code style: black](](

## Example

from asyncache import cached
from cachetools import TTLCache

pool = ...

@cached(TTLCache(1024, 60))
async def get_username(user_id):
rec = await pool.fetchrow(
id = $1

return rec and rec["username"]

## License

This project is licensed under the MIT License - see the []( file for details.

## Acknowledgments

* [cachetools](

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

asyncache-0.1.0.tar.gz (6.1 kB view hashes)

Uploaded source

Built Distribution

asyncache-0.1.0-py2.py3-none-any.whl (3.3 kB view hashes)

Uploaded py2 py3

Supported by

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