Add a new FileCache class to wrap RepoGroup::findFile() and findFiles(), and make...
authorIlmari Karonen <vyznev@users.mediawiki.org>
Sun, 14 Dec 2008 05:47:48 +0000 (05:47 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Sun, 14 Dec 2008 05:47:48 +0000 (05:47 +0000)
commit8b306154235b56bcbc74c03b6dabcbcbefbafb64
tree3770d368d11999ecd7e73c404d846afd6eeb4c78
parent98800054d935491ac1b9685143a55112c34a07b5
Add a new FileCache class to wrap RepoGroup::findFile() and findFiles(), and make wfFindFile() use it by default.  This should improve performance for pages that refer to the same image several times, but the real benefit is that it allows batch file existence checks, à la LinkBatch, by collecting a set of titles (or DB keys) and calling FileCache::findFiles() on them to prefill the cache.
XXX: The code seems to more or less work, but it obviously needs more testing, regarding both stability and memory usage.  In particular, I have not tested file uploads yet -- there may be consistency issues there.
RELEASE-NOTES
includes/AutoLoader.php
includes/GlobalFunctions.php
includes/filerepo/FileCache.php [new file with mode: 0644]