On Sun, Jan 04, 2009 at 01:43:58PM -0600, Dan McGee wrote:
Use the APC cache to store all of the counts and the recently updated package list in a cache, which cuts down on the number of database queries needed. If the data isn't perfectly up to date we will survive.
This version of the patch will also cache the relevant counts for individual logged-in users and is more careful about checking whether the value actually exists in the cache by using the status reference to apc_fetch().
Signed-off-by: Dan McGee <dan@archlinux.org> ---
Sorry I keep tweaking this patch, but I've extensively tested this version locally with APC both on and off and it seems to work quite well.
We even cache some user-specific stuff now for what its worth. Since our cache expires relatively quickly, this isn't going to be a used a lot but when it is it will save some database load.
No problem. I'd definitely like to understand and test this before pushing it though, so anything that reduces problems is great. The stats aren't exactly a critical feature though, so I guess there's no need to worry too much.