G
G
getnowtoday2017-09-06 17:02:15
Programming
getnowtoday, 2017-09-06 17:02:15

How to make "viewed N times" functionality for a blog post?

The article has a view counter. I'm wondering how you can update it so that it's efficient? After all, if you update it directly - I went to use it, I immediately made an sql query "update views_count +=1 where ..." - it will be too bold. And such precision is not needed.
Whereas? Where to buffer the number of users who came before making the request "update views_count +=N where ..."?

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