Cleanup and performance tweaks for BacklinkCache.
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 4 Apr 2013 18:51:22 +0000 (11:51 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 4 Apr 2013 21:54:53 +0000 (14:54 -0700)
commit4eb056d5491c62c74a4a8ba731bd9704e83a302f
tree4d64d2c55a87eb860cb538915a2423e0b59cabc9
parentcfcbb5e3badb2d8867170e564b1467a229a13434
Cleanup and performance tweaks for BacklinkCache.

* Batch the queries to get the partitions.
* Improved caching of getNumLinks() with $max.
* Added a TTL to the ProcessCacheLRU use for sanity.
* Some small logic cleanups in partitionResult().
* Also cleaned up some code duplication.

Bug: 43452
Change-Id: I0b9710fe222b3d2cb4dc9ab2eeb0758873a8066c
includes/cache/BacklinkCache.php