mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-10-31 04:02:03 +01:00
Mutation handlers (POST/PUT/DELETE) on channels, routes, user profiles, node tags, and adoptions now drop the corresponding Redis cache entries after commit so the UI reflects changes on the next page load instead of waiting for the 30s/300s TTL. Adds meshcore_hub.api.cache_invalidation with seven helpers that encapsulate the two cache-key formats (endpoint-name keys like 'nodes:' vs URL-path keys like '/api/v1/channels:') and swallow backend errors so a cache outage never breaks a successful write. The helper is a no-op when Redis is disabled. Cross-entity embeddings are covered: node-tag writes invalidate nodes, messages, advertisements, and dashboard; adoption writes invalidate nodes, profiles, advertisements, and dashboard. CLI/collector mutations remain TTL-bound (infrequent, operator-driven).