stats: better cache requirements checking

* check types
* check timeline has at least one post
* check user has at least one friend