MCPcopy Create free account
hub / github.com/requests-cache/requests-cache / init_cache

Method init_cache

tests/integration/test_filesystem.py:46–50  ·  view source on GitHub ↗
(self, index=0, clear=True, **kwargs)

Source from the content-addressed store, hash-verified

44 rmtree(CACHE_NAME, ignore_errors=True)
45
46 def init_cache(self, index=0, clear=True, **kwargs) -> FileDict:
47 cache = self.storage_class(f'{CACHE_NAME}_{index}', use_temp=True, **kwargs)
48 if clear:
49 cache.clear()
50 return cache
51
52 def test_use_cache_dir(self):
53 relative_path = self.storage_class(CACHE_NAME).cache_dir

Callers 2

test_custom_extensionMethod · 0.95
test_sizeMethod · 0.95

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected