Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Well ... like in science fiction films, apparently. You need to say in a voice: "Base, bring me popular entries in 24 hours." If the base is American, it's better to speak English, I think.
Or simplify the task and throw out the concept of "floating", then this is a simple sorted set out of the box.
Otherwise, for each post, as an option, create a list and store each access time in it.
When viewing, read the entire list, from the end or beginning (how to store) delete everything that is more than 24 hours. The length of list will be a valid number of views over a floating 24 hours. But with a lot of views and a lot of posts, this option is most likely not very attractive.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question