aboutsummaryrefslogtreecommitdiffstats
path: root/includes/cache/FileCacheBase.php
Commit message (Collapse)AuthorAgeFilesLines
* Improve class property documentationUmherirrender2020-10-301-1/+1
| | | | | | Reformat existing documentation to match the format Change-Id: I190b54b5e962f17bab6502dd1b3c02f11dc926d2
* Remove terminating line breaks from debug messagesTim Starling2020-06-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | A terminating line break has not been required in wfDebug() since 2014, however no migration was done. Some of these line breaks found their way into LoggerInterface::debug() calls, where they mess up the formatting of the debug log. So, remove terminating line breaks from wfDebug() and LoggerInterface::debug() calls. Also: * Fix the stripping of leading line breaks from the log header emitted by Setup.php. This feature, accidentally broken in 2014, allows requests to be distinguished in the log file. * Avoid using the global variable $self. * Move the logging of the client IP back to Setup.php. It was moved to WebRequest in the hopes that it would not always be needed, however $wgRequest->getIP() is now called unconditionally a few lines up in Setup.php. This means that it is put in its proper place after the "start request" message. * Wrap the log header code in a closure so that variables like $name do not leak into global scope. * In Linker.php, remove a few instances of an unnecessary second parameter to wfDebug(). Change-Id: I96651d3044a95b9d210b51cb8368edc76bebbb9e
* Fix even more PSR12.Properties.ConstantVisibility.NotFoundReedy2020-05-161-2/+2
| | | | Change-Id: I4a30a44bc33fc98479799438d65342f6529e14f9
* Use namespaced IPUtils classKunal Mehta2020-01-011-4/+6
| | | | Change-Id: I047e099a93203a59093946d336a143d899d0271f
* Migrate BagOStuff::incr() calls to incrWithInit()Aaron Schulz2019-08-251-9/+4
| | | | Change-Id: I722d6fe3d50c594858e3e7960fb99ef2fc1664b3
* Update suppressWarning()/restoreWarning() callsReedy2018-02-101-2/+2
| | | | | Bug: T182273 Change-Id: I9e1b628fe5949ca54258424c2e45b2fb6d491d0f
* FileCacheBase: Avoid deprecated wfMemcKey()Kunal Mehta2017-05-231-5/+6
| | | | Change-Id: I5476bf45deb55ef4ff158970102b1ce17d3fee29
* Clean up get_class($this) -> static::class in /includes/cache and /includes/libsTimo Tijhof2017-03-071-2/+2
| | | | | | | | * get_class() -> __CLASS__ (same as self::class) * get_called_class() -> static::class * get_class($this) -> static::class Change-Id: I22c62851bcc88405f4bdd77258d6e28ec1a14924
* Cleanup some incorrect return annotationsErik Bernhardson2016-12-121-1/+1
| | | | | | | | | | | | | | Most of these are simply changing annotations to reflect reality. If a function can return false to indicate failure the @return should indicate it. Some are fixing preg_match calls, preg match returns 1, 0 or false, but the functions all claim to return booleans. This is far from all the incorrect return types in mediawiki, there are around 250 detected by phan, but have to start somewhere. Change-Id: I1bbdfee6190747bde460f8a7084212ccafe169ef
* Make rebuildFileCache cover ?action=historyAaron Schulz2016-09-201-6/+0
| | | | | | Also simplified the logic slightly Change-Id: I6145d52b6b701735fa4bd8e41e07fb2bf6fdcee3
* Migrate more callers away from $wgMemcAaron Schulz2015-10-261-8/+8
| | | | | | | Callers should use more expliciy lazy-loaded cache factory methods. Change-Id: Ifa0bf389720a09a931ee6466b993f787d83a09a7
* Use mediawiki/at-ease library for suppressing warningsKunal Mehta2015-06-111-2/+2
| | | | | | | | | | | | | | | wfSuppressWarnings() and wfRestoreWarnings() were split out into a separate library. All usages in core were replaced with the new functions, and the wf* global functions are marked as deprecated. Additionally, some uses of @ were replaced due to composer's autoloader being loaded even earlier. Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to mediawiki/vendor. Bug: T100923 Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
* Fixed some @params documentation (includes/[cache|objectcache])umherirrender2014-04-191-2/+2
| | | | | | | | | Swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Also added some missing @param. Change-Id: I86fd10e3f2d4bb80e7432533038d124693acfb3c
* Update some documentationSiebrand Mazeland2013-12-031-0/+1
| | | | Change-Id: I6a75964d2048de451e9b01a08f87cfe1ebd842ba
* Break long lines in includes/cache/Siebrand Mazeland2013-11-171-1/+2
| | | | Change-Id: I23a6f46f89b3cdcaf2a3b982dc63e779eed5840d
* Update formattingSiebrand Mazeland2013-11-171-0/+7
| | | | Change-Id: I9aa56cbe0989d6f302ee0f47c4a6154101f73e90
* docs: Remove odd colons after @todoTimo Tijhof2013-05-151-1/+1
| | | | | | | | | | Most were this way already: https://doc.wikimedia.org/mediawiki-core/master/php/html/todo.html Ran a find/replace on the odd ones. Also made them all lower case. Change-Id: I70c6a69344ddebc603e9a1c1d87e3cc4f4f4c560
* Fixed spacing in actions/cache/filebackend/filerepo/job folderumherirrender2013-04-201-1/+1
| | | | | | | Added spaces before if, foreach Added some braces for one line statements Change-Id: Idb93d34e314e5f314223b79208968d6bcd30c40e
* Added/Removed spaces around string concatenationumherirrender2013-04-131-1/+1
| | | | | | | | | And added/removed spaces around some other tokens, like +, -, *, /, <, >, =, ! Fixed windows newline style Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
* Fixed @param tags to conform with Doxygen format.Tyler Anthony Romeo2013-03-111-1/+1
| | | | | | | | | | | Doxygen expects parameter types to come before the parameter name in @param tags. Used a quick regex to switch everything around where possible. This only fixes cases where a primitve variable (or a primitive followed by other types) is the variable type. Other cases will need to be fixed manually. Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
* fix some spacingumherirrender2013-02-091-1/+1
| | | | | | | | | | Added/removed spaces after opening/before closing parentheses Added a space after a comma Removed unneeded parentheses in condition Change-Id: I306091347ccaaf11dee0cdfda3019cb0c12be51b
* Remove a bunch of trailing spaces and unneeded newlinesumherirrender2012-10-101-1/+1
| | | | Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997
* Added missing GPLv2 headers in some places.Alexandre Emsenhuber2012-05-081-1/+23
| | | | | | Also made file/class documentation more consistent. Change-Id: I604ed8ddc572e89001e49df6740ab42307bc0330
* Add missing >Sam Reed2012-02-161-1/+1
| | | | | | | Ping r111324 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111611
* Fix some injection from r110871Antoine Musso2012-02-121-3/+6
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111324
* Fixing some of the "@return true" or "@return false", need to be "@return ↵Sam Reed2012-02-091-1/+1
| | | | | | | | | bool" and then the metadata can say true if foo, false if bar Other documentation improvements Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111049
* make gzopen() portable by using binary flagAntoine Musso2012-02-081-1/+1
| | | | | | | | | r110871 forgot the 'b' flag which make sure gzopen handle file content in binary form. That is for portability accross platforms. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110916
* simplify FileCacheBase::fetchTextAntoine Musso2012-02-071-6/+4
| | | | | | | | Implements a proposal by Tim on r98405 CR Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110871
* add up comment for FileCache rewrite (r98698)Antoine Musso2012-02-071-1/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110858
* Reverted r108743 per CR comment. This should at least be discussed first.Aaron Schulz2012-01-121-0/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108745
* Kill "* @return void"Sam Reed2012-01-121-3/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108743
* Comment and whitespace fixesTim Starling2011-12-271-4/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/107446
* Follow-up r98698: Reduce amount of ipv6 spam in ↵Aaron Schulz2011-12-231-1/+1
| | | | | | | FileCacheBase::incrMissesRecent() per CR Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/107137
* Simplified cacheDirectory() in FileCacheBase and HTMLFileCache. It turns out ↵Aaron Schulz2011-10-031-9/+2
| | | | | | | $wgFileCacheDirectory is always set in setup.php already. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98741
* * Added isCacheWorthy() optimization (checks if the file exists, stale or not)Aaron Schulz2011-10-021-4/+13
| | | | | | | | * Made isCached() use process cache * Added MISS_TTL_SEC constant and tweaked MISS_FACTOR constant Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98705
* FileCache:Aaron Schulz2011-10-021-13/+86
| | | | | | | | | | | | | | | * 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). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98698
* FU r98405: various document cleanupAaron Schulz2011-09-291-4/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98458
* HTMLFileCache refactoring:Aaron Schulz2011-09-291-0/+173
* 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. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98405