Skip to content

Commit 1d796c0

Browse files
authored
Merge pull request #10 from igormagalhaesr/igormagalhaesr-patch-1
Update README.md
2 parents 3cf5b4f + 3140954 commit 1d796c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,12 @@ async def read_posts(
392392

393393
...
394394

395-
# I'll invalidate the cache for the former endpoint by just passing the key_prefix and id as a dictionary:
395+
# Invalidating cache for the former endpoint by just passing the key_prefix and id as a dictionary:
396396
@router.delete("/{username}/post/{id}")
397397
@cache(
398398
"{username}_post_cache",
399399
resource_id_name="id",
400-
to_invalidate_extra={"{username}_posts": "{username}"} # Now it will also invalidate the cache with id "{username}_posts:{username}"
400+
to_invalidate_extra={"{username}_posts": "{username}"} # also invalidate "{username}_posts:{username}" cache
401401
)
402402
async def erase_post(
403403
request: Request,

0 commit comments

Comments
 (0)