MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / get_cache_dir

Function get_cache_dir

dwave/cloud/config/loaders.py:282–294  ·  view source on GitHub ↗

Return a directory path convenient for storing user-local, package-local and version-specific cache data.

(create: bool = False)

Source from the content-addressed store, hash-verified

280
281
282def get_cache_dir(create: bool = False) -> str:
283 """Return a directory path convenient for storing user-local,
284 package-local and version-specific cache data.
285 """
286 path = homebase.user_cache_dir(
287 app_name=__packagename__, app_author=CONF_AUTHOR,
288 version=__version__, use_virtualenv=False, create=False)
289
290 # avoid possible race condition on create (https://github.com/dwavesystems/homebase/issues/37)
291 if create:
292 os.makedirs(path, exist_ok=True)
293
294 return path
295
296
297def load_config_from_files(filenames=None):

Callers 5

_path_candidatesFunction · 0.90
ondiskMethod · 0.90
test_cache_dirMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_cache_dirMethod · 0.72