"Tim Starling" posted a comment on MediaWiki.r98698.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98698#c28397
Commit summary for MediaWiki.r98698:
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).
Tim Starling's comment:
<pre>
# Get a large IP range that should include the user even if that
# person's IP address changes
...
$ip = IP::isIPv6( $ip )
? IP::sanitizeRange( "$ip/64" )
: IP::sanitizeRange( "$ip/16" );
</pre>
You probably want /32 here. /64 is the smallest possible allocation larger than
a single address, and so if the ISPs have any sense, every residential customer
will get a /64 subnet. Some day every user may have a different /64, and that's
a lot of memcached spam with this code. /32 is probably the closest equivalent
to IPv4 /16.
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview