MCPcopy Create free account
hub / github.com/pyathena-dev/PyAthena / invalidate_cache

Method invalidate_cache

pyathena/filesystem/s3.py:1733–1740  ·  view source on GitHub ↗
(self, path: str | None = None)

Source from the content-addressed store, hash-verified

1731 return cast(datetime, info.get("last_modified"))
1732
1733 def invalidate_cache(self, path: str | None = None) -> None:
1734 if path is None:
1735 self.dircache.clear()
1736 else:
1737 path = self._strip_protocol(path)
1738 while path:
1739 self.dircache.pop(path, None)
1740 path = self._parent(path)
1741
1742 def _ls_from_cache(self, path: str) -> list[S3Object] | S3Object | None:
1743 """Check the dircache for a cached entry of the path.

Callers 15

rm_fileMethod · 0.95
rmMethod · 0.95
mkdirMethod · 0.95
rmdirMethod · 0.95
touchMethod · 0.95
cp_fileMethod · 0.95
pipe_fileMethod · 0.95
put_fileMethod · 0.95
setxattrMethod · 0.95
commitMethod · 0.45
test_ls_bucketsMethod · 0.45

Calls

no outgoing calls

Tested by 10

test_ls_bucketsMethod · 0.36
test_info_dirMethod · 0.36
test_info_fileMethod · 0.36
test_ls_bucketsMethod · 0.36
test_info_dirMethod · 0.36
test_info_fileMethod · 0.36
test_invalidate_cacheMethod · 0.36