Skip to content

Commit

Permalink
clear instance cache (#99)
Browse files Browse the repository at this point in the history
* clear instance cache

* docs

* invalidate cache

* cleanup

* restore dirname
  • Loading branch information
malmans2 authored Aug 21, 2023
1 parent 4378ef8 commit 8bea976
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cacholote/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ class set:
Note that existing tags are overwritten.
return_cache_entry: bool, default: False
Whether to return the cache database entry rather than decoded results.
lock_timeout: fload, optional, default: None
Time to wait before raising an error if a cache file is locked.
"""

def __init__(self, **kwargs: Any):
Expand Down
1 change: 1 addition & 0 deletions tests/test_60_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ def test_clean_invalid_cache_entries(
)

# Check files
fs.invalidate_cache(dirname)
assert valid in fs.ls(dirname)
assert (
corrupted not in fs.ls(dirname) if try_decode else corrupted in fs.ls(dirname)
Expand Down

0 comments on commit 8bea976

Please sign in to comment.