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 hashes)