MediaWiki REL1_39
BacklinkCacheFactory.php
Go to the documentation of this file.
1<?php
25
29
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(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
Definition WebStart.php:82
Class for fetching backlink lists, approximate backlink counts and partitions.
getBacklinkCache(PageReference $page)
Returns a BacklinkCache for $page.
Multi-datacenter aware caching interface.
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.