MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_resolve_cache_dir

Function cbm_resolve_cache_dir

src/foundation/platform.c:404–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402/* ── Cache directory ────────────────────────── */
403
404const char *cbm_resolve_cache_dir(void) {
405 static char buf[CBM_SZ_1K];
406 char tmp[CBM_SZ_256] = "";
407 cbm_safe_getenv("CBM_CACHE_DIR", tmp, sizeof(tmp), NULL);
408 if (tmp[0]) {
409 snprintf(buf, sizeof(buf), "%s", tmp);
410 cbm_normalize_path_sep(buf);
411 return buf;
412 }
413 const char *home = cbm_get_home_dir();
414 if (!home) {
415 return NULL;
416 }
417 snprintf(buf, sizeof(buf), "%s/.cache/codebase-memory-mcp", home);
418 return buf;
419}

Callers 15

mainFunction · 0.85
cbm_store_openFunction · 0.85
get_cache_dirFunction · 0.85
cbm_cmd_configFunction · 0.85
delete_cached_project_dbFunction · 0.85
cache_dirFunction · 0.85
write_skip_logfileFunction · 0.85
supervisor_tmp_pathFunction · 0.85
maybe_auto_indexFunction · 0.85
worker_tmp_pathFunction · 0.85
cbm_ui_config_pathFunction · 0.85
handle_ui_configFunction · 0.85

Calls 3

cbm_safe_getenvFunction · 0.85
cbm_normalize_path_sepFunction · 0.85
cbm_get_home_dirFunction · 0.85

Tested by

no test coverage detected