Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add@cacheable #104

Closed
wants to merge 12 commits into from
Closed

Conversation

mkdir700
Copy link
Contributor

@mkdir700 mkdir700 commented Nov 8, 2022

#96

add @cacheable

example:

from fastapi_cache.decorator import cacheable

@cacheable(key="xxx:{0}:{b}", expire=60)
async def test_func(a: int, b: int) -> int:
    return a + b

async def main():
    await test_func(1, 2)
    # cache_key -> 'xxx:1:2'

@long2ice long2ice deleted the branch long2ice:master January 11, 2023 13:19
@long2ice long2ice closed this Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants