I am developing an app and I need to tackle a problem here.
The app is kind of an e-commerce app where each user will be shown a list of items daily. The problem is, I need to keep a track of all the items seen by a user so that those items are not shown again.
How can I do this?
Approach I Maintain the ids of all the items seen by a user in a cache and check the cache each time a GET API call comes from a user.
Approach II Maintain a reverse mapping from item to user to avoid showing duplicate items.