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

Method cache_max_size

pygit2/settings.py:143–151  ·  view source on GitHub ↗

Set the maximum total data size that will be cached in memory across all repositories before libgit2 starts evicting objects from the cache. This is a soft limit, in that the library might briefly exceed it, but will start aggressively evicting objects from

(self, value: int)

Source from the content-addressed store, hash-verified

141 return option(Option.DISABLE_PACK_KEEP_FILE_CHECKS, value)
142
143 def cache_max_size(self, value: int) -> None:
144 """
145 Set the maximum total data size that will be cached in memory
146 across all repositories before libgit2 starts evicting objects
147 from the cache. This is a soft limit, in that the library might
148 briefly exceed it, but will start aggressively evicting objects
149 from cache when that happens. The default cache size is 256MB.
150 """
151 return option(Option.SET_CACHE_MAX_SIZE, value)
152
153 def cache_object_limit(
154 self, object_type: pygit2.enums.ObjectType, value: int

Callers 2

test_cache_max_sizeFunction · 0.80

Calls 1

optionFunction · 0.90

Tested by 2

test_cache_max_sizeFunction · 0.64