Files
basicmachines-co-basic-memory/src
claude[bot] 57c83b0072 fix: invalidate config cache on file mtime change for MCP stdio server
The module-level _CONFIG_CACHE was never refreshed in long-lived processes
(e.g. MCP stdio server used by Claude Desktop), so bm project set-cloud
or set-local had no effect until the server was restarted.

Add a companion _CONFIG_CACHE_MTIME variable that records the config
file's mtime when the cache is populated.  load_config() now does a
cheap stat() call on each invocation and drops the cache when the mtime
has changed, allowing the updated routing mode to take effect immediately
without a server restart.

save_config() clears both cache variables so in-process saves still work
correctly.

Fixes #660

Co-authored-by: Drew Cain <groksrc@users.noreply.github.com>
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-03-10 17:48:02 +00:00
..