Added some doc comments for BacklinkCache.

Change-Id: I71201582726c986384fe9fba60a5bdc7fa465be8
This commit is contained in:
Aaron Schulz 2012-09-10 23:32:12 -07:00
parent dcdb56b3f6
commit e40a90f0bc

View file

@ -91,14 +91,16 @@ class BacklinkCache {
}
/**
* Create a new BacklinkCache or reuse any existing one
* Create a new BacklinkCache or reuse any existing one.
* Currently, only one cache instance can exist; callers that
* need multiple backlink cache objects should keep them in scope.
*
* @param Title $title : Title object to get a backlink cache for
* @return BacklinkCache
*/
public static function get( Title $title ) {
if ( !self::$cache ) { // init cache
self::$cache = new ProcessCacheLRU( 2 );
self::$cache = new ProcessCacheLRU( 1 );
}
$dbKey = $title->getPrefixedDBkey();
if ( !self::$cache->has( $dbKey, 'obj' ) ) {