Skip to main content

acachetools provides asyncio-compatible versions of cachetools.cached() and cachetools.cachedmethod(). Concurrent calls for the same cache key share a single in-flight computation, preventing cache stampedes.

Installation

pip install acachetools

Usage

from cachetools import TTLCache
from acachetools import cached

# Compatible with TTLCache, LRUCache, LFUCache, RRCache, etc.
@cached(cache=TTLCache(maxsize=1024, ttl=600))
async def foo(bar: int):
    ...

Download files

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

Source Distribution

acachetools-0.1.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acachetools-0.1.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file acachetools-0.1.1.tar.gz.

File metadata

  • Download URL: acachetools-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acachetools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 122b7b5fadb91773663df192dc9aebec93049facbf41616612b746032c518bab
MD5 7d23efddac5f36e06d84c92516886d6b
BLAKE2b-256 fda406bff3037680972e6416501f400bc3f4efda284b1223a2c82efd2c900c9e

See more details on using hashes here.

File details

Details for the file acachetools-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: acachetools-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acachetools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 424c6779abf5846ffdf4399fd7f0983e97e500b56da4af1e9c3a041229e2dbb9
MD5 fc4a062aad6bdd3bbdecd4b7e8def678
BLAKE2b-256 04bd9cec3dfd1bae6dbd2443e70c471add97ce9a7f15b426c08dde5da841599b

See more details on using hashes here.

Supported by

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