Member Junction
    Preparing search index...

    Interface CacheChangedEvent

    interface CacheChangedEvent {
        Action: "set" | "removed" | "category_cleared" | "row_delta";
        CacheKey: string;
        Category: string;
        Data?: string;
        Epoch?: number;
        SourceServerId: string;
        Timestamp: number;
    }
    Index

    Properties

    Action: "set" | "removed" | "category_cleared" | "row_delta"

    What happened to the cache entry.

    • 'set' — a new value was stored (create or replace)
    • 'row_delta' — one or more rows were upserted/deleted in place (Data encodes CacheRowDeltaPayload)
    • 'removed' — a single key was deleted
    • 'category_cleared' — all keys in the category were deleted
    CacheKey: string

    The cache key that changed. For RunView results, this is the fingerprint generated by LocalCacheManager.GenerateRunViewFingerprint (format: EntityName|Filter|OrderBy|MaxRows|StartRow|AggHash[|Connection]).

    Category: string

    The storage category of the changed entry. One of: 'RunViewCache', 'RunQueryCache', 'DatasetCache', 'Metadata', 'default'.

    Data?: string

    The new cached value as a JSON string, included in the event to avoid a round-trip back to Redis. Only present for 'set' actions. For 'removed' and 'category_cleared' actions, this is undefined.

    Epoch?: number

    Monotonic counter shared by every server, incremented once per shared-cache mutation.

    For recovery rather than ordering: a subscriber that was disconnected cannot see what pub/sub did not replay, so it records the highest epoch it has seen and compares that with the current value on reconnect to learn whether anything was invalidated meanwhile.

    Optional — transports without the counter omit it, and consumers that do not reconcile can ignore it.

    SourceServerId: string

    The MJGlobal.ProcessUUID of the server that made the change. Used to filter out self-originated events (a server doesn't need to react to its own mutations).

    Timestamp: number

    UTC Unix timestamp in milliseconds when the change occurred (Date.now()).