Maintaining list of items seen by an user

by coderahul94   Last Updated September 16, 2018 18:05 PM

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.



Related Questions




Seeking Guidance on System Design for a Game Server

Updated August 23, 2019 11:05 AM