Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kiyomi-parents/outcache

Function output cacher
https://github.com/kiyomi-parents/outcache

Last synced: about 1 month ago
JSON representation

Function output cacher

Awesome Lists containing this project

README

        

[![PyPI version](https://badge.fury.io/py/OutCache.svg)](https://pypi.org/project/OutCache)
# OutCache
Function output cacher

### Regular usage:

```python
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("[email protected]", username="example")
```

### Async usage
```python
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("[email protected]", username="example")
```