kevinjqliu commented on code in PR #1187: URL: https://github.com/apache/iceberg-python/pull/1187#discussion_r1769269027
########## pyiceberg/manifest.py: ########## @@ -620,6 +623,13 @@ def fetch_manifest_entry(self, io: FileIO, discard_deleted: bool = True) -> List ] +@cached(cache=LRUCache(maxsize=128), key=lambda io, manifest_list: hashkey(manifest_list)) Review Comment: yep! the difference is that `functools.lru_cache` uses all of the function's args as the cache key, including the `io` arg. Using `cachetools`, I can specify which argument to use as the cache key. In this case, only using `manifest_list` as the cache key ``` key=lambda io, manifest_list: hashkey(manifest_list) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org