You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// handleFetchSegmentEvent handles any PATCH/CREATE Segment events that we receive from Harness Saas.
452
+
//
453
+
// When we get a PATCH/CREATE segment event there are three keys in the cache that we need to update.
454
+
// 1. env-<id>-segment-<identifier> entry which is the individual segment record for that environment
455
+
// 2. env-<id>-segments entry which is the collection of segments for that environment. Since a change has been made to a flag in this environment, we need to update that specific segment in this collection.
456
+
// 3. inventory entry for the segments. This Inventory entry tracks all the resources in the cache associated with the Proxy key. It's used for cache cleanup and diffing assets during stream disconnects.
457
+
//
458
+
// In order to ensure we update these records correctly, when we get a PATCH/CREATE feature event we need to do the following:
459
+
// 1. Fetch the segment from HarnessSaas.
460
+
// 2. Update the individual segment record in the cache.
461
+
// 3. Update the segments record in the cache.
462
+
// 4. Update the inventory record for the segment.
0 commit comments