MediaWiki
REL1_37
BacklinkCacheFactory.php
Go to the documentation of this file.
1
<?php
24
namespace
MediaWiki\Cache
;
25
26
use
BacklinkCache
;
27
use
MediaWiki\Page\PageReference
;
28
use
WANObjectCache
;
29
33
class
BacklinkCacheFactory
{
35
private
$latestBacklinkCache
;
36
38
private
$wanCache
;
39
43
public
function
__construct
(
WANObjectCache
$wanCache
) {
44
$this->wanCache =
$wanCache
;
45
}
46
57
public
function
getBacklinkCache
(
PageReference
$page ):
BacklinkCache
{
58
if
( !$this->latestBacklinkCache || !$this->latestBacklinkCache->getPage()->isSamePageAs( $page ) ) {
59
$this->latestBacklinkCache =
new
BacklinkCache
( $this->wanCache, $page );
60
}
61
return
$this->latestBacklinkCache
;
62
}
63
}
if
if(ini_get('mbstring.func_overload')) if(!defined('MW_ENTRY_POINT'))
Pre-config setup: Before loading LocalSettings.php.
Definition
Setup.php:88
BacklinkCache
Class for fetching backlink lists, approximate backlink counts and partitions.
Definition
BacklinkCache.php:50
MediaWiki\Cache\BacklinkCacheFactory
Definition
BacklinkCacheFactory.php:33
MediaWiki\Cache\BacklinkCacheFactory\__construct
__construct(WANObjectCache $wanCache)
Definition
BacklinkCacheFactory.php:43
MediaWiki\Cache\BacklinkCacheFactory\$wanCache
WANObjectCache $wanCache
Definition
BacklinkCacheFactory.php:38
MediaWiki\Cache\BacklinkCacheFactory\$latestBacklinkCache
BacklinkCache $latestBacklinkCache
Definition
BacklinkCacheFactory.php:35
MediaWiki\Cache\BacklinkCacheFactory\getBacklinkCache
getBacklinkCache(PageReference $page)
Returns a BacklinkCache for $page.
Definition
BacklinkCacheFactory.php:57
WANObjectCache
Multi-datacenter aware caching interface.
Definition
WANObjectCache.php:128
MediaWiki\Page\PageReference
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.
Definition
PageReference.php:49
MediaWiki\Cache
Definition
BacklinkCacheFactory.php:24
includes
cache
BacklinkCacheFactory.php
Generated on Fri Apr 5 2024 23:40:05 for MediaWiki by
1.9.8