@huan
In my opinion
this.cache.roomMember.set(roomId, {
... cachedPayload,
memberId: payload,
})
Should be changed to
this.cache.roomMember.set(roomId, {
... cachedPayload,
[memberId] : payload,
})
This makes use of the cache and optimizes the query speed