Bug 19240 (bad image list performance regression):
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 17 Jun 2009 07:31:00 +0000 (07:31 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 17 Jun 2009 07:31:00 +0000 (07:31 +0000)
commit6cba5762b72cb5f0b0509f1d580a516b1f921f3d
tree2b99c6cd27156bc1d954a15d9be95f391719511b
parent5d87d7d6b785a1a24294ae84a5029504ce5067d9
Bug 19240 (bad image list performance regression):
* Don't connect to the commons DB on cache hits, in order to determine the cache key name. Removed remnants of that bright idea from GlobalFunctions.php.
* Fixed total failure of negative caching in checkRedirect() due to memcached stripping trailing spaces from string values. Probably never worked.

Also:
* Respect hasSharedCache in foreign repos. Recently-added code was apparently ignorant of this setting.
* Renamed getMemcKey() to getSharedCacheKey() to make its function more clear, introduced getLocalCacheKey() to do the other thing. Fixed its parameters to be like wfMemcKey() and used it in more places.
* Used getLocalCacheKey() in various places instead of wfMemc(), to avoid having multiple repositories overwrite each others' caches.
* Fixed the BagOStuff bug that the FIXME in LocalRepo::checkRedirect() appears to refer to.
* Removed getMasterDB() and getSlaveDB() from FileRepo, it's incorrect to assume that a repo other than a LocalRepo has an associated database.
* Made FileRepo::invalidateImageRedirect() a stub, to match FileRepo::checkRedirect(). Moved the functionality to LocalRepo where checkRedirect() is concretely implemented.
12 files changed:
RELEASE-NOTES
includes/BagOStuff.php
includes/GlobalFunctions.php
includes/filerepo/File.php
includes/filerepo/FileRepo.php
includes/filerepo/ForeignAPIFile.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/ForeignDBFile.php
includes/filerepo/ForeignDBRepo.php
includes/filerepo/ForeignDBViaLBRepo.php
includes/filerepo/LocalFile.php
includes/filerepo/LocalRepo.php