Added some doc comments for BacklinkCache.
Change-Id: I71201582726c986384fe9fba60a5bdc7fa465be8
This commit is contained in:
parent
dcdb56b3f6
commit
e40a90f0bc
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
* @param Title $title : Title object to get a backlink cache for
|
||||||
* @return BacklinkCache
|
* @return BacklinkCache
|
||||||
*/
|
*/
|
||||||
public static function get( Title $title ) {
|
public static function get( Title $title ) {
|
||||||
if ( !self::$cache ) { // init cache
|
if ( !self::$cache ) { // init cache
|
||||||
self::$cache = new ProcessCacheLRU( 2 );
|
self::$cache = new ProcessCacheLRU( 1 );
|
||||||
}
|
}
|
||||||
$dbKey = $title->getPrefixedDBkey();
|
$dbKey = $title->getPrefixedDBkey();
|
||||||
if ( !self::$cache->has( $dbKey, 'obj' ) ) {
|
if ( !self::$cache->has( $dbKey, 'obj' ) ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue