Implement solution for deduplication of random results
When requesting random results, we should make best efforts to deduplicate results for the current user. To action this, a couple of changes will need to be made.
- A new cache region will need to be created that will contain a list of seen entries for a given user. This region should have time to live for entries, as we only want items to live for a shorter time to reduce impact on cache.
- Logic will need to be added to retrieve a unique key for each user based on available information. Initial thought is to use OAuth token, but this has the implication that every user will be authenticated for API access.
- Cache will need to be passed to the Query layer so that an explicit list of seen IDs can be included in the request for entries to exclude.
- On successful query, post-processing will need to be done to record the newly seen entries into the cache entry for the current user.