Answer the question
In order to leave comments, you need to log in
What is the best way to store viewed IM products?
Interested in what solutions you can try to store viewed products? Each registered user of the store can additionally filter products by viewed and not viewed. At the moment I'm looking towards Redis, but maybe there is another option? The data is not stored within the session (so I'm not sure if memcached is suitable), but for example 1 month. You only need to store the product id and user id. I see no reason to write to the MySQL database, because write operations are quite overhead in terms of resources.
Answer the question
In order to leave comments, you need to log in
there is nothing overhead for mysql to write down a couple of integers - do you have a billion users there? there will be the same speed as in redis
and in general you can store viewed id in cookies in the user's browser and don't care if he registers and no
Redis is an ok solution actually. And MySQL... yes too norms. It all depends on the load and frequency of requests.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question