mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
57c83b0072
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>