MCPcopy Create free account
hub / github.com/idank/explainshell / _estimate_cache_value_size

Function _estimate_cache_value_size

explainshell/caching_store.py:87–90  ·  view source on GitHub ↗
(value: _CacheValue)

Source from the content-addressed store, hash-verified

85
86
87def _estimate_cache_value_size(value: _CacheValue) -> int:
88 if isinstance(value, _FindManpageMiss):
89 return 64 + _estimate_value_size(value.args)
90 return 64 + sum(_estimate_manpage_size(manpage) for manpage in value)
91
92
93class CachingStore(Store):

Callers 1

_cache_manpageMethod · 0.85

Calls 2

_estimate_value_sizeFunction · 0.85
_estimate_manpage_sizeFunction · 0.85

Tested by

no test coverage detected