Catrope
edde0a423b
Remove duplicate URLs in SquidUpdate.php
...
This has to be done in 3 places, because there are 3 public entry
points.
I originally submitted this to fight duplicates I thought I was seeing
in production, but it turns out I'm blind and the URLs weren't
duplicates after all. Nevertheless, preventing duplicate purges in the
SquidUpdate class is a good idea.
Change-Id: Idc21dd7d0b3b79572853b787fac746454d9178ea
2012-04-06 11:26:46 -07:00
Sam Reed
2d25a902e3
More of r113580
2012-03-11 22:05:54 +00:00
Robin Pepermans
9184dc83d6
Update core usage of getLanguageName[s].
2012-03-08 20:56:26 +00:00
Tim Starling
d85a86baa1
Fix for r86304: if MessageCache::parse() is called twice, once with $interface=true and then with $interface=false, actually use $interface=false the second time instead of using the cached value from the previous call. Same for $language. This is the reason why edittools was affected by bug 34832.
2012-03-02 04:00:58 +00:00
Aaron Schulz
1062d84d48
Fixed bogus call to method on a string
2012-02-16 05:04:17 +00:00
Sam Reed
e394044eae
Add missing >
...
Ping r111324
2012-02-16 02:34:59 +00:00
Antoine Musso
1379b783aa
Fix some injection from r110871
2012-02-12 19:51:03 +00:00
Sam Reed
c052fc3b7b
Documentation followups from lastnight
2012-02-10 15:37:33 +00:00
Sam Reed
76246b9bf5
More return documentation
2012-02-09 21:33:27 +00:00
Sam Reed
7b25f8231f
Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
...
Other documentation improvements
2012-02-09 19:30:01 +00:00
Aaron Schulz
18df3d63bd
Made loadFromFileCache() always disable $wgOut regardless of whether compression is used
2012-02-09 18:53:35 +00:00
Sam Reed
e1d83d5721
Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
...
Other documentation improvements
2012-02-09 18:01:54 +00:00
Sam Reed
138ddc452f
Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
...
Other documentation improvements
2012-02-09 17:42:35 +00:00
Antoine Musso
9b6a4c922a
debug statements for HTMLFileCache / Output
2012-02-09 10:56:36 +00:00
Antoine Musso
564919a0d5
make gzopen() portable by using binary flag
...
r110871 forgot the 'b' flag which make sure gzopen handle file
content in binary form. That is for portability accross platforms.
2012-02-08 07:03:20 +00:00
Antoine Musso
8cbd865d2c
simplify FileCacheBase::fetchText
...
Implements a proposal by Tim on r98405 CR
2012-02-07 20:47:45 +00:00
Antoine Musso
1cb1abe773
add up comment for FileCache rewrite (r98698)
2012-02-07 17:56:32 +00:00
Sam Reed
fa3ccef8b2
Merge r97508 changes to MessageCache.php and Skin.php into trunk
2012-02-07 16:49:34 +00:00
Alexandre Emsenhuber
34789d1c85
Follow-up r110761: removed duplicate check of $wgShowIPinHeader and fix some whitespaces
2012-02-06 21:52:48 +00:00
Antoine Musso
57e874c374
disable wgDebugToolbar when rebuilding file cache
...
credits to iAlex :)
2012-02-06 17:17:51 +00:00
Alexandre Emsenhuber
64aff97567
Removed false comment, we no longer use file cache for action=raw calls.
2012-02-06 11:35:24 +00:00
Aaron Schulz
5a6559d8b1
Reverted r108743 per CR comment. This should at least be discussed first.
2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b
Kill "* @return void"
2012-01-12 19:12:24 +00:00
Niklas Laxström
055a1c485c
Moved GenderCache to cache/
2012-01-10 07:39:51 +00:00
Mark A. Hershberger
2447a305c7
Attempt to avoid a warning I got during input:
...
$ 7z x -so ../dewikisource-20111012-pages-meta-history.xml.7z | php maintenance/importDump.php
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: ../dewikisource-20111012-pages-meta-history.xml.7z
Extracting dewikisource-20111012-pages-meta-history.xml
PHP Notice: Undefined index: wgExtensionAliasesFiles in /home/mah/work/code/mediawiki/mw-
svn/includes/cache/CacheDependency.php on line 386
PHP Stack trace:
PHP 1. {main}() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:0
PHP 2. require_once() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:287
PHP 3. BackupReader->execute() /home/mah/work/code/mediawiki/mw-svn/maintenance/doMaintenance.php:105
PHP 4. BackupReader->importFromStdin() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:93
PHP 5. BackupReader->importFromHandle() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:249
PHP 6. WikiImporter->doImport() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:282
PHP 7. WikiImporter->handlePage() /home/mah/work/code/mediawiki/mw-svn/includes/Import.php:411
PHP 8. WikiImporter->processTitle() /home/mah/work/code/mediawiki/mw-svn/includes/Import.php:534
PHP 9. Title->userCan() /home/mah/work/code/mediawiki/mw-svn/includes/Import.php:788
PHP 10. Title->getUserPermissionsErrorsInternal() /home/mah/work/code/mediawiki/mw-svn/includes/Title.php:1557
PHP 11. Title->checkSpecialsAndNSPermissions() /home/mah/work/code/mediawiki/mw-svn/includes/Title.php:2118
PHP 12. Title->getNsText() /home/mah/work/code/mediawiki/mw-svn/includes/Title.php:1728
PHP 13. Language->needsGenderDistinction() /home/mah/work/code/mediawiki/mw-svn/includes/Title.php:723
PHP 14. LocalisationCache->getItem() /home/mah/work/code/mediawiki/mw-svn/languages/Language.php:442
PHP 15. LocalisationCache->loadItem() /home/mah/work/code/mediawiki/mw-svn/includes/LocalisationCache.php:218
PHP 16. LocalisationCache->initLanguage() /home/mah/work/code/mediawiki/mw-svn/includes/LocalisationCache.php:283
PHP 17. LocalisationCache->isExpired() /home/mah/work/code/mediawiki/mw-svn/includes/LocalisationCache.php:395
PHP 18. GlobalDependency->isExpired() /home/mah/work/code/mediawiki/mw-svn/includes/LocalisationCache.php:367
2012-01-04 16:29:01 +00:00
Tim Starling
0463749a26
Comment and whitespace fixes
2011-12-27 22:38:44 +00:00
Aaron Schulz
15beeb4d40
Follow-up r98698: Reduce amount of ipv6 spam in FileCacheBase::incrMissesRecent() per CR
2011-12-23 07:41:23 +00:00
Alexandre Emsenhuber
74b9522134
Declare constant default values directly in the class definition and removed the constructor since it's useless now
2011-12-21 18:53:00 +00:00
Niklas Laxström
9f9242ce6f
Gender is already needed in addResultToCache
2011-12-08 08:51:21 +00:00
John Du Hart
216d661d3b
Bug 29524 - Rename RequestContext::getLang to getLanguage
...
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Aaron Schulz
5214c4f073
* Let HTMLFileCache constructor take in a Title *or* a the prefixed dbkey itself.
...
* Tweaked filecache fallback in fileCachedPage() to try the raw title param. If the DB is down, we can get most views of titles with colons in them to work this way. Previously, it could fail on an interwiki lookup.
2011-11-02 20:01:22 +00:00
Sam Reed
52cd34acf5
More documentation
2011-10-29 01:53:28 +00:00
Sam Reed
450814de00
More documentation updates
2011-10-28 18:11:47 +00:00
Aaron Schulz
6918f1d62d
FU r98405: ObjectFileCache doesn't need to be abstract
2011-10-06 21:13:38 +00:00
Happy-melon
a73791be74
Documentation and type hinting.
2011-10-06 13:22:53 +00:00
Aaron Schulz
41a09896c1
* Added a script to prune old file cache entries.
...
* Use default .cache extension for ResourceFileCache. No need for js/css extension, and makes extension sanity check in prune script simpler.
* Removed redundant setting of mExt in ObjectFileCache
2011-10-04 08:03:43 +00:00
Aaron Schulz
119ee2a872
Simplified cacheDirectory() in FileCacheBase and HTMLFileCache. It turns out $wgFileCacheDirectory is always set in setup.php already.
2011-10-03 06:54:39 +00:00
Aaron Schulz
2bb5bec447
Follow-up r98698: cache urls with 'version' param...which is kind if important
2011-10-03 05:32:48 +00:00
Aaron Schulz
1ba93d9b77
* Added isCacheWorthy() optimization (checks if the file exists, stale or not)
...
* Made isCached() use process cache
* Added MISS_TTL_SEC constant and tweaked MISS_FACTOR constant
2011-10-02 19:44:31 +00:00
Aaron Schulz
93d358cd0c
FileCache:
...
* Added FileCacheBase::*MissesRecent() functions for counting cache misses from different visitors.
* Made ObjectFileCache more generic.
* Cleaned up FileCacheBase::checkCacheDirs().
* Added FileCacheBase::typeSubdirectory() function and overwrote in HTMLFileCache. Fixes r98405 invalidating all existing cache due to directory change.
* Simplified FileCacheBase::checkCacheDirs() a bit
ResourceLoader:
* Use ResourceFileCache to handle load() requests, if $wgUseFileCache. Only caches requests for default language and skins. Single modules requests are always cached, whereas others require a certain threshold of traffic.
* Added ResourceFileCache class (functionality was initially to be in ObjectFileCache).
2011-10-02 17:53:33 +00:00
Daniel Friesen
8ca8e37db7
More RequestContext -> IContextSource.
2011-10-02 17:42:21 +00:00
Aaron Schulz
224541f861
Reverted accidental change in r98405
2011-10-02 07:29:39 +00:00
Sam Reed
fdc70c6a3d
More spurious code r98467
2011-09-29 22:17:20 +00:00
Sam Reed
937fc3bcfd
Back out r95396 and friends
2011-09-29 22:08:00 +00:00
Aaron Schulz
6559b8bfcc
FU r98405: various document cleanup
2011-09-29 21:17:43 +00:00
Aaron Schulz
6014f0db91
HTMLFileCache refactoring:
...
* Rewrote class and split into three classes: a base class, and html cache and a more generic cache to be used later.
* The new classes now use RequestContext.
* Renamed fetchPageText() -> fetchText().
* Split out new saveText() function from saveToFileCache().
* Various other cleanups and fixes.
Also fixed backwards setting of $wgDisableCounters in rebuildFileCache.php.
2011-09-29 08:18:20 +00:00
Brion Vibber
ea44989fe4
Debug logging and possible fix for bug 31177: mystery sidebar message failures
...
This may be related to things failing on load from External Storage; however we have not yet been able to verify this.
Tweaks MessageCache::loadFromDB() and MessageCache::getMsgFromNamespace() to avoid storing empty cache entries when loading text fails.
When building initial cache if we get a failure we'll log and store a '!TOO BIG' message which requests on-demand load later.
If an on-demand load failures, we'll log and return the false through but won't update the cache with the bad value.
To enable the logging in production, set up a $wgDebugLogFiles entry for 'MessageCache'.
Note that MessageCache::loadFromDB() bypasses Revision's text entry memcaching and may cause a lot of ES fetches at once.
However any ES failures *should* already be logged in the 'ExternalStoreDB' log file.
2011-09-27 00:41:24 +00:00
Aaron Schulz
23c430f64a
Added filecache support for history pages
2011-09-24 01:17:04 +00:00
Aaron Schulz
7fa47e0c8f
Removed action=raw support from HTMLFileCache. Obsolete due to RL.
2011-09-24 00:37:11 +00:00
Niklas Laxström
efb7b817a7
I broke few parser tests in r97633 by overlooking the return value. This fixes them.
2011-09-20 16:26:39 +00:00