2 ms·
Two things occur: 1. This is a better fit for memcache than redis, since you can get the counts to expire automatically 2. If you are fetching paginated resul
by seldo 16y ago
Two things occur:
1. This is a better fit for memcache than redis, since you can get the counts to expire automatically
2. If you are fetching paginated results with a LIMIT (and you usually are) then you can use the SQL_CALC_FOUND_ROWS prefix on your SELECT to get these counts for "free" from MySQL without needing to do your own caching (see http://dev.mysql.com/doc/refman/5.0/en/select.html http://dev.mysql.com/doc/refman/5.0/en/select.html )