Number of invalidation events currently retained in the circular ring buffer.
Latest monotonic sequence number assigned to a cache invalidation event in this process.
Maximum number of invalidation events held in the circular ring buffer.
Unique identifier of the running MJServer process, emitted in X-MJ-Server-ID.
Identifier for the active broadcast topology.
Configures the provider instance with buffer sizing, entity exclusions, and cloud settings.
Optionalconfig: CacheBroadcastProviderConfigEvaluates whether user has entity-level read permission for payload, memoized by
(payload, entityName, roleFingerprint) so $N$ subscribers sharing $R$ role combinations
only run GetUserPermisions $R$ times per event.
OptionalentityLookup: (entityName: string) => EntityInfoReturns all permission-allowed, RLS-shaped invalidation events strictly after sinceSequence
for user. If sinceSequence has already been evicted from the ring buffer (or lies in the
future due to a server restart), sets RequiresFullRefresh: true and returns an empty Events list.
Computes a canonical, order-independent role fingerprint for a user (RoleHolder).
Memoized per user object in a WeakMap so repeated evaluations across thousands of events are $O(1)$.
Negotiates a client broadcast connection (URL, token, and authorized role-bucket groups) for the given authenticated user.
ProtectedOnHook invoked after an invalidation event is sequenced and stored in the ring buffer. Cloud multiplexer providers override this to forward role-bucketed payloads to their external pub/sub infrastructure.
Evaluates whether every read permission the user holds on entity is gated by a
Row-Level Security filter (ReadRLSFilterID).
Assigns the next monotonic sequence number to payload (if not already stamped on this server),
appends it to the bounded circular ring buffer, and invokes OnInvalidationRecorded for
provider-specific fan-out.
Resets the sequence counter and ring buffer. Intended for unit tests.
Resolves and caches the EntityInfo for a CacheInvalidationPayload so that
CacheInvalidationFilter and CacheInvalidationResolver do not repeat metadata lookups.
OptionalentityLookup: (entityName: string) => EntityInfoShapes a CacheInvalidationPayload into a CacheInvalidationNotification for user and entity.
When user and entity are present and user.UserRoles is populated, the shaped object is
memoized per (payload, entity, roleFingerprint) so $N$ subscribers sharing $R$ role buckets
only allocate and evaluate ReadIsRowFiltered $R$ times per event.
Returns whether invalidation events for entityName should be broadcast to clients.
Returns false for blank names or entities explicitly listed in excludedEntities.
Default MemberJunction cache invalidation broadcast provider (
'SequencedRoleBucket').Combines:
Sequenceinteger, stores the event in a bounded ring buffer, and piggybacksX-MJ-Cache-SeqandX-MJ-Server-IDonto GraphQL HTTP responses so clients can detect and recover missed invalidations viaGetCacheInvalidationsSincein a single delta query.CanRead) and row-level security key-withholding (ReadIsRowFiltered) once per unique role fingerprint (RoleIDset) per event instead of re-evaluating permissions $N$ times across all connected WebSocket clients.Zero external cloud infrastructure is required.