kris-gaudel commented on code in PR #2993:
URL: https://github.com/apache/iceberg-python/pull/2993#discussion_r2838409768


##########
pyiceberg/manifest.py:
##########
@@ -891,15 +892,32 @@ def __hash__(self) -> int:
         return hash(self.manifest_path)
 
 
-# Global cache for ManifestFile objects, keyed by manifest_path.
-# This deduplicates ManifestFile objects across manifest lists, which commonly
-# share manifests after append operations.
-_manifest_cache: LRUCache[str, ManifestFile] = LRUCache(maxsize=128)
-
-# Lock for thread-safe cache access
+_DEFAULT_MANIFEST_CACHE_SIZE = 128
 _manifest_cache_lock = threading.RLock()
 
 
+def _init_manifest_cache() -> LRUCache[str, ManifestFile] | None:

Review Comment:
   I defined a separate function for it because it made it easier to unit test, 
but I'm fine with removing it



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to