Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 672 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 672 Bytes

PyPI version

OutCache

Function output cacher

Regular usage:

from outcache import Cache


@Cache(minutes=1)
def get_profile(email: str, username: str):
    my_dict = {"email": email, "username": username}

    return my_dict

profile = get_profile("example@example.com", username="example")

Async usage

from outcache import CacheAsync

@CacheAsync(minutes=1)
async def get_profile(email: str, username: str):
    my_dict = {"email": email, "username": username}

    return my_dict

profile = await get_profile("example@example.com", username="example")