On Thu, Jan 8, 2009 at 12:14 PM, Loui Chang <louipc.ist@gmail.com> wrote:
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.
I pushed this as is, but I had to commit a fix because it was causing this error:
PHP Fatal error: Call to undefined function apc_store() in /home/louipc/devel/git/aur/web/lib/stats.inc on line 36
Are you actually testing your patches?
Definitely- I'm running the whole setup locally. I swear I had wrapped these calls as you ended up doing, and I wonder if I lost work during one of my iterations. Thanks for making the fixes. Since we only run the AUR in one place and I know it has APC available, I was a bit less intensive about testing the not-installed case although I tried to accommodate it. -Dan