Let's assume I want to push the count of a user's posts in a thread into the thread's template. Then, I would need to query something like
"SELECT COUNT FROM post WHERE thread_id = AND user_id = ".
But what about pages 2, 3, 4, ...?
Do I want an extra query for each page? Does it make sense to cache this value? If so, where and how? If not, why not?
Читать далее...
"SELECT COUNT FROM post WHERE thread_id = AND user_id = ".
But what about pages 2, 3, 4, ...?
Do I want an extra query for each page? Does it make sense to cache this value? If so, where and how? If not, why not?
Читать далее...