The current implementation has us requesting OrganisationVenue's based on the events they run on a day-to-day basis. This means on a Monday, only OrganisationVenue's that have events running that day should be shown.
A typical request is only for one single day, as each day is loaded independently. Parameters:
latlonradiusstart_timeend_timeactivity_type
An expected response would be along the lines of:
[
{ "organisation" : {...},
"venue" : {...},
"event_min_price : ...,
"event_count" : ...
},
{ "organisation" : {...},
"venue" : {...},
"event_min_price : ...,
"event_count" : ...
},
]
Each of these OrganisationVenue's should only be relevant for the date and activity_type supplied.
On my end, given that I no longer have access to the Event's, I would attach a dictionary onto the OrganisationVenue linking activity_types to the day they run. I can obtain this information from the request I make. Moreover, I would need to link event countandevent_min_price` to specific dates too.
Therefore, when loading from cache, I can safely query the dictionary for the activity_type and see what if any of the dates match the current query. If they do, I can show that organisation venue.
For that part I was thinking of tagging
OrganisationVenueswith the types of activity they do so this can be easily retrieved.This may have some side effects though but it may be worth it for the speed.
Maybe it'd be worthwhile to add the activity_type -> date dictionary on your end within the background job? Then the actual request just needs to query a pre-computed dictionary on the
OrganisationVenue.