MCPcopy Create free account
hub / github.com/libgit2/pygit2 / cache_object_limit

Method cache_object_limit

pygit2/settings.py:153–163  ·  view source on GitHub ↗

Set the maximum data size for the given type of object to be considered eligible for caching in memory. Setting to value to zero means that that type of object will not be cached. Defaults to 0 for enums.ObjectType.BLOB (i.e. won't cache blobs) and 4k for CO

(
        self, object_type: pygit2.enums.ObjectType, value: int
    )

Source from the content-addressed store, hash-verified

151 return option(Option.SET_CACHE_MAX_SIZE, value)
152
153 def cache_object_limit(
154 self, object_type: pygit2.enums.ObjectType, value: int
155 ) -> None:
156 """
157 Set the maximum data size for the given type of object to be
158 considered eligible for caching in memory. Setting to value to
159 zero means that that type of object will not be cached.
160 Defaults to 0 for enums.ObjectType.BLOB (i.e. won't cache blobs)
161 and 4k for COMMIT, TREE, and TAG.
162 """
163 return option(Option.SET_CACHE_OBJECT_LIMIT, object_type, value)
164
165 @property
166 def ssl_cert_file(self) -> str | bytes | None:

Callers 2

test_cache_object_limitFunction · 0.80

Calls 1

optionFunction · 0.90

Tested by 2

test_cache_object_limitFunction · 0.64