MediaWiki
1.39.10
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(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
Definition
WebStart.php:82
BacklinkCache
Class for fetching backlink lists, approximate backlink counts and partitions.
Definition
BacklinkCache.php:51
MediaWiki\Cache\BacklinkCacheFactory
Definition
BacklinkCacheFactory.php:33
MediaWiki\Cache\BacklinkCacheFactory\__construct
__construct(WANObjectCache $wanCache)
Definition
BacklinkCacheFactory.php:43
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:132
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 Tue Oct 1 2024 01:15:18 for MediaWiki by
1.10.0