Skip to content

Commit

Permalink
Improve valis_cache docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Dec 13, 2024
1 parent c845173 commit 1d8a6a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/valis/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ def valis_cache(
with a key builder that hashes the body of the request in addition to the function
arguments.
The main change is that the call to ``fastapi_cache.decorator._uncacheable`` has
been removed and we accept all route types. `.valis_cache_key_builder` looks
at the body of the request and hashes its body so that POST requests to the same
route with different parameters are cached separately. It also defaults to
``settings.cache_ttl`` for the expiration time of the cached value.
"""

injected_request = Parameter(
Expand Down

0 comments on commit 1d8a6a5

Please sign in to comment.