Cachetools Utilities
Project description
CacheToolsUtils
Classes to add key prefix and stats to cachetools classes and use redis and memcached as storage backends, and other cache-related utils.
Module Contents
For our purpose, a cache is a key-value store, aka a dictionary, possibly with
some constraints on keys (type, size) and values (size, serialization).
Thi module provide new caches, wrappers and other utilities suitable to use
with cachetools.
Cache classes
RedisCacheallows to see a Redis server as a python cache by wrapping aredis.Redisinstance.MemCacheddoes the same for a Memcached server. The utility classJsonSerdeis a convenient JSON serializer-deserializer class for Memcached.DictCacheadictcache.
Other wrappers to extend cache capabilities
PrefixedCache,PrefixedMemCachedandPrefixedRedisCacheadd a prefix to distinguish sources on a shared cache.StatsCache,StatsMemCachedandStatsRedisCacheadd ahits()method to report the cache hit rate.LockedCacheuse a (thread) lock to control cache accesses.TwoLevelCacheallows to combine two caches.
Cache utilities
cacheddecorator: a cachetools replacement which allows to test e if a function result is in cache, and to delete such an entry.cacheFunctionsandcacheMethods: add caching to functions or methods.
More
See the documentation, sources and issues on GitHub.
See packages on PyPI.
License
This code is public domain.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file CacheToolsUtils-8.0.tar.gz.
File metadata
- Download URL: CacheToolsUtils-8.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9675d60e4a0c736b8edfdec075554cd39a12c97e4aa514bb70b63b6e8c38a8d
|
|
| MD5 |
9c9c235eb570abad9c2d1a19116e5ffd
|
|
| BLAKE2b-256 |
a7c24064ba2669e08017e03b7d92a7ba02d2d902d0944fc8b77646226d029ddc
|
File details
Details for the file CacheToolsUtils-8.0-py3-none-any.whl.
File metadata
- Download URL: CacheToolsUtils-8.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e714204968fd7227780c8b5f12ea78ec5e65714886436a8d41a58f67dfaa8c47
|
|
| MD5 |
7188640ec6deabbb2111c8120ebce40b
|
|
| BLAKE2b-256 |
dbf3164e2fac4fd6810edced903a1ad30304ff0da29d66114b62e6054da77204
|