Package for function caching
Project description
kwcache - make cache easy
import asyncio
from kwcache import kwcache
@kwcache(max_key_call=5)
def test(*args, **kwargs):
print('test')
return args, kwargs
for i in range(15):
test(1, "1", test=1)
test(2, "2", test=2)
test(3, "3", test=3)
@kwcache(max_key_call=5)
async def atest(*args, **kwargs):
print('test')
return args, kwargs
for i in range(15):
asyncio.run(atest(1, "1", test=1))
asyncio.run(atest(2, "2", test=2))
asyncio.run(atest(3, "3", test=3))
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
kwcache-0.0.2.tar.gz
(7.2 kB
view details)
File details
Details for the file kwcache-0.0.2.tar.gz
.
File metadata
- Download URL: kwcache-0.0.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ab0fd96c1b143a4f29c2385f2d2e3b383418e0063e7d8b07aac91ad79b175dc |
|
MD5 | 1465541b0df798367d012cc9236f840e |
|
BLAKE2b-256 | 6b5e7578d2a8f2f1138158e39dc71425db4d70946e380f13f2278d4f0cdfaa35 |