Skip to main content

Function: setupCacheSync()

function setupCacheSync(): () => void;

Defined in: src/utils/cacheSync.ts:105

Set up automatic cache synchronization with backend. Listens for cache invalidation events, clears appropriate frontend caches, and triggers asynchronous store refreshes for sites and monitor types when needed.

Returnsโ€‹

Cleanup function to remove event listeners. Call this function when the component unmounts or cache sync is no longer needed to prevent memory leaks and avoid processing events after cleanup.

() => void