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

Function flow_cache_key

src/ui/atlas_flows.c:120–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static void flow_cache_key(cbm_store_t *store, const char *project, char *out, size_t cap) {
121 char stamp[128] = {0};
122 struct sqlite3 *db = cbm_store_get_db(store);
123 sqlite3_stmt *st = NULL;
124 if (db && sqlite3_prepare_v2(db, "SELECT indexed_at FROM projects WHERE name=?1", -1, &st,
125 NULL) == SQLITE_OK) {
126 sqlite3_bind_text(st, 1, project, -1, SQLITE_STATIC);
127 if (sqlite3_step(st) == SQLITE_ROW) {
128 const char *t = (const char *)sqlite3_column_text(st, 0);
129 if (t)
130 snprintf(stamp, sizeof(stamp), "%s", t);
131 }
132 sqlite3_finalize(st);
133 }
134 snprintf(out, cap, "%s|%s", project, stamp);
135}
136
137/* ── Entry scoring ────────────────────────────────────────────── */
138

Callers 1

fl_ensure_lockedFunction · 0.85

Calls 1

cbm_store_get_dbFunction · 0.85

Tested by

no test coverage detected