A
A
Alexey Konovalov2018-03-07 23:38:09
caching
Alexey Konovalov, 2018-03-07 23:38:09

Lost the meaning of caching. How to cache data for different users?

Hello! Tell me how to solve this problem...
I decided to cache the data for the news feed... But there is a problem... in each news you can put a like, which means that in order to highlight the news to the user in a different color, to which he likes, you need to receive data about likes in the query to the database along with data about news....
It turns out that if you cache the received list of news at the output, the next user will see not his own likes, but other people's...
It turns out that in such a situation the cache is meaningless, or there are ways get around this problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question