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
Broker uses two strategies to cache full opportunity data: opportunityItemRowCache and opportunityCache (see their documentation in packages/openactive-broker-microservice/src/state.js).
In both cases, at least for "child" Opportunities e.g. Slots and ScheduledSessions, the full opportunity data is stored once in both caches.
For this issue, investigate whether it's possible to consolidate these such that we don't store two copies of each child Opportunity. One possible outcome is that there's a good reason for it to stay like it is (although I expect we could at least change one of the storage methods to use an ID to refer to the other). Try to get a good understanding of why it is the way it is before changing it. There might be some wisdom in there, which may still be true or now be outdated.
The text was updated successfully, but these errors were encountered:
lukehesluke
changed the title
Broker: Consolidate opportunityItemRowCache and opportunityCache to reduce memory usage
Broker: Consolidate opportunityItemRowCache and opportunityCache to reduce memory usage & simplify code
Mar 25, 2024
Broker uses two strategies to cache full opportunity data: opportunityItemRowCache and opportunityCache (see their documentation in packages/openactive-broker-microservice/src/state.js).
In both cases, at least for "child" Opportunities e.g. Slots and ScheduledSessions, the full opportunity data is stored once in both caches.
For this issue, investigate whether it's possible to consolidate these such that we don't store two copies of each child Opportunity. One possible outcome is that there's a good reason for it to stay like it is (although I expect we could at least change one of the storage methods to use an ID to refer to the other). Try to get a good understanding of why it is the way it is before changing it. There might be some wisdom in there, which may still be true or now be outdated.
The text was updated successfully, but these errors were encountered: