2004-02-18 02:15:00 +00:00
|
|
|
<?php
|
2012-05-08 12:51:21 +00:00
|
|
|
/**
|
|
|
|
|
* Page existence cache.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
|
|
|
|
* @file
|
|
|
|
|
* @ingroup Cache
|
|
|
|
|
*/
|
2017-02-07 04:49:57 +00:00
|
|
|
|
|
|
|
|
use Wikimedia\Rdbms\Database;
|
2017-02-10 18:09:05 +00:00
|
|
|
use Wikimedia\Rdbms\IDatabase;
|
2016-04-27 21:52:50 +00:00
|
|
|
use MediaWiki\Linker\LinkTarget;
|
|
|
|
|
use MediaWiki\MediaWikiServices;
|
2012-05-08 12:51:21 +00:00
|
|
|
|
2004-09-02 23:28:24 +00:00
|
|
|
/**
|
|
|
|
|
* Cache for article titles (prefixed DB keys) and ids linked from one source
|
2008-04-14 07:45:50 +00:00
|
|
|
*
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
* @ingroup Cache
|
2004-09-02 23:28:24 +00:00
|
|
|
*/
|
2005-08-02 13:35:19 +00:00
|
|
|
class LinkCache {
|
2016-09-02 14:19:13 +00:00
|
|
|
/** @var HashBagOStuff */
|
2015-07-26 23:07:59 +00:00
|
|
|
private $mGoodLinks;
|
2016-09-02 14:19:13 +00:00
|
|
|
/** @var HashBagOStuff */
|
2015-07-26 23:07:59 +00:00
|
|
|
private $mBadLinks;
|
2016-09-02 14:19:13 +00:00
|
|
|
/** @var WANObjectCache */
|
|
|
|
|
private $wanCache;
|
|
|
|
|
|
|
|
|
|
/** @var bool */
|
2011-12-21 18:53:00 +00:00
|
|
|
private $mForUpdate = false;
|
2004-07-18 08:48:43 +00:00
|
|
|
|
2016-09-02 14:19:13 +00:00
|
|
|
/** @var TitleFormatter */
|
2016-04-27 21:52:50 +00:00
|
|
|
private $titleFormatter;
|
|
|
|
|
|
2015-07-26 23:07:59 +00:00
|
|
|
/**
|
|
|
|
|
* How many Titles to store. There are two caches, so the amount actually
|
|
|
|
|
* stored in memory can be up to twice this.
|
|
|
|
|
*/
|
|
|
|
|
const MAX_SIZE = 10000;
|
|
|
|
|
|
2016-09-02 14:19:13 +00:00
|
|
|
public function __construct( TitleFormatter $titleFormatter, WANObjectCache $cache ) {
|
2016-02-17 09:09:32 +00:00
|
|
|
$this->mGoodLinks = new HashBagOStuff( [ 'maxKeys' => self::MAX_SIZE ] );
|
|
|
|
|
$this->mBadLinks = new HashBagOStuff( [ 'maxKeys' => self::MAX_SIZE ] );
|
2016-09-02 14:19:13 +00:00
|
|
|
$this->wanCache = $cache;
|
2016-04-27 21:52:50 +00:00
|
|
|
$this->titleFormatter = $titleFormatter;
|
2015-07-26 23:07:59 +00:00
|
|
|
}
|
|
|
|
|
|
2013-05-20 10:37:15 +00:00
|
|
|
/**
|
|
|
|
|
* Get an instance of this class.
|
2011-04-25 22:41:54 +00:00
|
|
|
*
|
|
|
|
|
* @return LinkCache
|
2016-05-12 22:44:33 +00:00
|
|
|
* @deprecated since 1.28, use MediaWikiServices instead
|
2006-01-05 02:05:53 +00:00
|
|
|
*/
|
2016-04-27 21:30:54 +00:00
|
|
|
public static function singleton() {
|
2016-05-12 22:44:33 +00:00
|
|
|
return MediaWikiServices::getInstance()->getLinkCache();
|
2003-11-04 08:59:28 +00:00
|
|
|
}
|
2005-08-02 13:35:19 +00:00
|
|
|
|
2004-09-02 23:28:24 +00:00
|
|
|
/**
|
2015-10-30 09:29:12 +00:00
|
|
|
* General accessor to get/set whether the master DB should be used
|
|
|
|
|
*
|
|
|
|
|
* This used to also set the FOR UPDATE option (locking the rows read
|
|
|
|
|
* in order to avoid link table inconsistency), which was later removed
|
|
|
|
|
* for performance on wikis with a high edit rate.
|
2011-05-28 18:58:51 +00:00
|
|
|
*
|
2014-04-18 23:19:46 +00:00
|
|
|
* @param bool $update
|
2011-05-28 18:58:51 +00:00
|
|
|
* @return bool
|
2004-09-02 23:28:24 +00:00
|
|
|
*/
|
2009-12-11 21:07:27 +00:00
|
|
|
public function forUpdate( $update = null ) {
|
2004-07-18 08:48:43 +00:00
|
|
|
return wfSetVar( $this->mForUpdate, $update );
|
|
|
|
|
}
|
2005-08-02 13:35:19 +00:00
|
|
|
|
2011-05-28 18:58:51 +00:00
|
|
|
/**
|
2016-04-27 21:34:18 +00:00
|
|
|
* @param string $title Prefixed DB key
|
2015-11-09 23:14:42 +00:00
|
|
|
* @return int Page ID or zero
|
2011-05-28 18:58:51 +00:00
|
|
|
*/
|
2008-04-09 13:02:34 +00:00
|
|
|
public function getGoodLinkID( $title ) {
|
2015-11-09 23:17:39 +00:00
|
|
|
$info = $this->mGoodLinks->get( $title );
|
|
|
|
|
if ( !$info ) {
|
2003-04-14 23:10:40 +00:00
|
|
|
return 0;
|
|
|
|
|
}
|
2015-11-09 23:14:42 +00:00
|
|
|
return $info['id'];
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
2008-04-14 07:45:50 +00:00
|
|
|
|
2008-04-09 05:21:00 +00:00
|
|
|
/**
|
2008-04-14 07:45:50 +00:00
|
|
|
* Get a field of a title object from cache.
|
2015-11-09 23:14:42 +00:00
|
|
|
* If this link is not a cached good title, it will return NULL.
|
2016-04-27 21:52:50 +00:00
|
|
|
* @param LinkTarget $target
|
2013-03-11 17:15:01 +00:00
|
|
|
* @param string $field ('length','redirect','revision','model')
|
2015-11-09 23:14:42 +00:00
|
|
|
* @return string|int|null
|
2008-04-09 05:21:00 +00:00
|
|
|
*/
|
2016-04-27 21:52:50 +00:00
|
|
|
public function getGoodLinkFieldObj( LinkTarget $target, $field ) {
|
|
|
|
|
$dbkey = $this->titleFormatter->getPrefixedDBkey( $target );
|
2015-11-09 23:17:39 +00:00
|
|
|
$info = $this->mGoodLinks->get( $dbkey );
|
|
|
|
|
if ( !$info ) {
|
2009-12-11 21:07:27 +00:00
|
|
|
return null;
|
2008-04-09 05:21:00 +00:00
|
|
|
}
|
2015-11-09 23:14:42 +00:00
|
|
|
return $info[$field];
|
2008-04-09 05:21:00 +00:00
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2011-05-28 18:58:51 +00:00
|
|
|
/**
|
2016-04-27 21:34:18 +00:00
|
|
|
* @param string $title Prefixed DB key
|
2011-05-28 18:58:51 +00:00
|
|
|
* @return bool
|
|
|
|
|
*/
|
2008-04-09 13:02:34 +00:00
|
|
|
public function isBadLink( $title ) {
|
2015-11-09 23:14:42 +00:00
|
|
|
// Use get() to ensure it records as used for LRU.
|
2015-11-09 23:17:39 +00:00
|
|
|
return $this->mBadLinks->get( $title ) !== false;
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
|
|
|
|
|
2008-04-09 05:21:00 +00:00
|
|
|
/**
|
|
|
|
|
* Add a link for the title to the link cache
|
2010-07-17 20:13:49 +00:00
|
|
|
*
|
2013-11-17 20:42:23 +00:00
|
|
|
* @param int $id Page's ID
|
2016-04-27 21:52:50 +00:00
|
|
|
* @param LinkTarget $target
|
2013-11-17 20:42:23 +00:00
|
|
|
* @param int $len Text's length
|
|
|
|
|
* @param int $redir Whether the page is a redirect
|
|
|
|
|
* @param int $revision Latest revision's ID
|
2014-08-20 21:46:11 +00:00
|
|
|
* @param string|null $model Latest revision's content model ID
|
2015-12-19 15:25:45 +00:00
|
|
|
* @param string|null $lang Language code of the page, if not the content language
|
2008-04-09 05:21:00 +00:00
|
|
|
*/
|
2016-04-27 21:52:50 +00:00
|
|
|
public function addGoodLinkObj( $id, LinkTarget $target, $len = -1, $redir = null,
|
2015-12-19 15:25:45 +00:00
|
|
|
$revision = 0, $model = null, $lang = null
|
2013-11-17 20:42:23 +00:00
|
|
|
) {
|
2016-04-27 21:52:50 +00:00
|
|
|
$dbkey = $this->titleFormatter->getPrefixedDBkey( $target );
|
2016-02-17 09:09:32 +00:00
|
|
|
$this->mGoodLinks->set( $dbkey, [
|
2015-07-26 23:07:59 +00:00
|
|
|
'id' => (int)$id,
|
2013-11-17 20:42:23 +00:00
|
|
|
'length' => (int)$len,
|
|
|
|
|
'redirect' => (int)$redir,
|
|
|
|
|
'revision' => (int)$revision,
|
2014-08-20 21:46:11 +00:00
|
|
|
'model' => $model ? (string)$model : null,
|
2015-12-19 15:25:45 +00:00
|
|
|
'lang' => $lang ? (string)$lang : null,
|
2016-02-17 09:09:32 +00:00
|
|
|
] );
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
|
|
|
|
|
2011-09-20 15:19:18 +00:00
|
|
|
/**
|
|
|
|
|
* Same as above with better interface.
|
|
|
|
|
* @since 1.19
|
2016-04-27 21:52:50 +00:00
|
|
|
* @param LinkTarget $target
|
2014-04-18 23:19:46 +00:00
|
|
|
* @param stdClass $row Object which has the fields page_id, page_is_redirect,
|
2012-06-11 13:36:52 +00:00
|
|
|
* page_latest and page_content_model
|
2011-09-20 15:19:18 +00:00
|
|
|
*/
|
2016-04-27 21:52:50 +00:00
|
|
|
public function addGoodLinkObjFromRow( LinkTarget $target, $row ) {
|
|
|
|
|
$dbkey = $this->titleFormatter->getPrefixedDBkey( $target );
|
2016-02-17 09:09:32 +00:00
|
|
|
$this->mGoodLinks->set( $dbkey, [
|
2015-07-26 23:07:59 +00:00
|
|
|
'id' => intval( $row->page_id ),
|
2011-09-20 15:19:18 +00:00
|
|
|
'length' => intval( $row->page_len ),
|
|
|
|
|
'redirect' => intval( $row->page_is_redirect ),
|
|
|
|
|
'revision' => intval( $row->page_latest ),
|
2012-06-25 21:30:51 +00:00
|
|
|
'model' => !empty( $row->page_content_model ) ? strval( $row->page_content_model ) : null,
|
2015-12-19 15:25:45 +00:00
|
|
|
'lang' => !empty( $row->page_lang ) ? strval( $row->page_lang ) : null,
|
2016-02-17 09:09:32 +00:00
|
|
|
] );
|
2011-09-20 15:19:18 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-26 19:21:50 +00:00
|
|
|
/**
|
2016-04-27 21:52:50 +00:00
|
|
|
* @param LinkTarget $target
|
2011-05-26 19:21:50 +00:00
|
|
|
*/
|
2016-04-27 21:52:50 +00:00
|
|
|
public function addBadLinkObj( LinkTarget $target ) {
|
|
|
|
|
$dbkey = $this->titleFormatter->getPrefixedDBkey( $target );
|
2008-08-29 19:12:56 +00:00
|
|
|
if ( !$this->isBadLink( $dbkey ) ) {
|
2015-07-26 23:07:59 +00:00
|
|
|
$this->mBadLinks->set( $dbkey, 1 );
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-04-26 21:36:24 +00:00
|
|
|
/**
|
2016-04-27 21:34:18 +00:00
|
|
|
* @param string $title Prefixed DB key
|
2016-04-26 21:36:24 +00:00
|
|
|
*/
|
2008-04-09 13:02:34 +00:00
|
|
|
public function clearBadLink( $title ) {
|
2016-04-26 21:36:24 +00:00
|
|
|
$this->mBadLinks->delete( $title );
|
2003-11-04 08:59:28 +00:00
|
|
|
}
|
2005-08-02 13:35:19 +00:00
|
|
|
|
2011-05-26 19:21:50 +00:00
|
|
|
/**
|
2016-04-27 21:52:50 +00:00
|
|
|
* @param LinkTarget $target
|
2011-05-26 19:21:50 +00:00
|
|
|
*/
|
2016-04-27 21:52:50 +00:00
|
|
|
public function clearLink( LinkTarget $target ) {
|
|
|
|
|
$dbkey = $this->titleFormatter->getPrefixedDBkey( $target );
|
2015-11-09 23:17:39 +00:00
|
|
|
$this->mBadLinks->delete( $dbkey );
|
|
|
|
|
$this->mGoodLinks->delete( $dbkey );
|
2008-09-07 08:24:06 +00:00
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2005-12-30 09:33:11 +00:00
|
|
|
/**
|
|
|
|
|
* Add a title to the link cache, return the page_id or zero if non-existent
|
2010-07-17 20:13:49 +00:00
|
|
|
*
|
2016-04-27 21:52:50 +00:00
|
|
|
* @deprecated since 1.27, unused
|
2016-04-27 21:34:18 +00:00
|
|
|
* @param string $title Prefixed DB key
|
2015-11-09 23:14:42 +00:00
|
|
|
* @return int Page ID or zero
|
2005-12-30 09:33:11 +00:00
|
|
|
*/
|
2010-07-17 20:13:49 +00:00
|
|
|
public function addLink( $title ) {
|
2003-11-04 08:59:28 +00:00
|
|
|
$nt = Title::newFromDBkey( $title );
|
2015-11-09 23:14:42 +00:00
|
|
|
if ( !$nt ) {
|
2003-11-04 08:59:28 +00:00
|
|
|
return 0;
|
|
|
|
|
}
|
2015-11-09 23:14:42 +00:00
|
|
|
return $this->addLinkObj( $nt );
|
2003-10-22 23:56:49 +00:00
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2016-05-13 07:00:39 +00:00
|
|
|
/**
|
|
|
|
|
* Fields that LinkCache needs to select
|
|
|
|
|
*
|
|
|
|
|
* @since 1.28
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public static function getSelectFields() {
|
|
|
|
|
global $wgContentHandlerUseDB, $wgPageLanguageUseDB;
|
|
|
|
|
|
|
|
|
|
$fields = [ 'page_id', 'page_len', 'page_is_redirect', 'page_latest' ];
|
|
|
|
|
if ( $wgContentHandlerUseDB ) {
|
|
|
|
|
$fields[] = 'page_content_model';
|
|
|
|
|
}
|
|
|
|
|
if ( $wgPageLanguageUseDB ) {
|
|
|
|
|
$fields[] = 'page_lang';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $fields;
|
|
|
|
|
}
|
|
|
|
|
|
2005-12-30 09:33:11 +00:00
|
|
|
/**
|
|
|
|
|
* Add a title to the link cache, return the page_id or zero if non-existent
|
2010-07-17 20:13:49 +00:00
|
|
|
*
|
2016-04-27 21:52:50 +00:00
|
|
|
* @param LinkTarget $nt LinkTarget object to add
|
2015-11-09 23:14:42 +00:00
|
|
|
* @return int Page ID or zero
|
2005-12-30 09:33:11 +00:00
|
|
|
*/
|
2016-04-27 21:52:50 +00:00
|
|
|
public function addLinkObj( LinkTarget $nt ) {
|
|
|
|
|
$key = $this->titleFormatter->getPrefixedDBkey( $nt );
|
2016-05-20 02:01:48 +00:00
|
|
|
if ( $this->isBadLink( $key ) || $nt->isExternal()
|
|
|
|
|
|| $nt->inNamespace( NS_SPECIAL )
|
|
|
|
|
) {
|
2008-08-29 19:12:56 +00:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
$id = $this->getGoodLinkID( $key );
|
|
|
|
|
if ( $id != 0 ) {
|
|
|
|
|
return $id;
|
2005-10-22 20:52:30 +00:00
|
|
|
}
|
|
|
|
|
|
2008-08-29 19:12:56 +00:00
|
|
|
if ( $key === '' ) {
|
2005-08-02 13:35:19 +00:00
|
|
|
return 0;
|
2003-10-16 13:30:45 +00:00
|
|
|
}
|
2011-02-12 04:06:22 +00:00
|
|
|
|
2016-09-02 14:19:13 +00:00
|
|
|
// Cache template/file pages as they are less often viewed but heavily used
|
|
|
|
|
if ( $this->mForUpdate ) {
|
|
|
|
|
$row = $this->fetchPageRow( wfGetDB( DB_MASTER ), $nt );
|
|
|
|
|
} elseif ( $this->isCacheable( $nt ) ) {
|
|
|
|
|
// These pages are often transcluded heavily, so cache them
|
|
|
|
|
$cache = $this->wanCache;
|
|
|
|
|
$row = $cache->getWithSetCallback(
|
|
|
|
|
$cache->makeKey( 'page', $nt->getNamespace(), sha1( $nt->getDBkey() ) ),
|
|
|
|
|
$cache::TTL_DAY,
|
|
|
|
|
function ( $curValue, &$ttl, array &$setOpts ) use ( $cache, $nt ) {
|
|
|
|
|
$dbr = wfGetDB( DB_REPLICA );
|
|
|
|
|
$setOpts += Database::getCacheSetOptions( $dbr );
|
2005-08-02 13:35:19 +00:00
|
|
|
|
2016-09-02 14:19:13 +00:00
|
|
|
$row = $this->fetchPageRow( $dbr, $nt );
|
|
|
|
|
$mtime = $row ? wfTimestamp( TS_UNIX, $row->page_touched ) : false;
|
|
|
|
|
$ttl = $cache->adaptiveTTL( $mtime, $ttl );
|
2015-11-09 23:14:42 +00:00
|
|
|
|
2016-09-02 14:19:13 +00:00
|
|
|
return $row;
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
$row = $this->fetchPageRow( wfGetDB( DB_REPLICA ), $nt );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( $row ) {
|
2015-11-09 23:14:42 +00:00
|
|
|
$this->addGoodLinkObjFromRow( $nt, $row );
|
|
|
|
|
$id = intval( $row->page_id );
|
2008-08-29 19:12:56 +00:00
|
|
|
} else {
|
2005-05-26 10:23:36 +00:00
|
|
|
$this->addBadLinkObj( $nt );
|
2011-09-20 16:26:39 +00:00
|
|
|
$id = 0;
|
2005-05-26 10:23:36 +00:00
|
|
|
}
|
2011-09-20 15:19:18 +00:00
|
|
|
|
2003-04-14 23:10:40 +00:00
|
|
|
return $id;
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-03 04:43:16 +00:00
|
|
|
/**
|
|
|
|
|
* @param WANObjectCache $cache
|
|
|
|
|
* @param TitleValue $t
|
|
|
|
|
* @return string[]
|
|
|
|
|
* @since 1.28
|
|
|
|
|
*/
|
|
|
|
|
public function getMutableCacheKeys( WANObjectCache $cache, TitleValue $t ) {
|
|
|
|
|
if ( $this->isCacheable( $t ) ) {
|
|
|
|
|
return [ $cache->makeKey( 'page', $t->getNamespace(), sha1( $t->getDBkey() ) ) ];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return [];
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-02 14:19:13 +00:00
|
|
|
private function isCacheable( LinkTarget $title ) {
|
|
|
|
|
return ( $title->inNamespace( NS_TEMPLATE ) || $title->inNamespace( NS_FILE ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function fetchPageRow( IDatabase $db, LinkTarget $nt ) {
|
|
|
|
|
$fields = self::getSelectFields();
|
|
|
|
|
if ( $this->isCacheable( $nt ) ) {
|
|
|
|
|
$fields[] = 'page_touched';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $db->selectRow(
|
|
|
|
|
'page',
|
|
|
|
|
$fields,
|
|
|
|
|
[ 'page_namespace' => $nt->getNamespace(), 'page_title' => $nt->getDBkey() ],
|
|
|
|
|
__METHOD__
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Purge the link cache for a title
|
|
|
|
|
*
|
|
|
|
|
* @param LinkTarget $title
|
|
|
|
|
* @since 1.28
|
|
|
|
|
*/
|
|
|
|
|
public function invalidateTitle( LinkTarget $title ) {
|
|
|
|
|
if ( $this->isCacheable( $title ) ) {
|
|
|
|
|
$cache = ObjectCache::getMainWANInstance();
|
|
|
|
|
$cache->delete(
|
|
|
|
|
$cache->makeKey( 'page', $title->getNamespace(), sha1( $title->getDBkey() ) )
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2004-09-02 23:28:24 +00:00
|
|
|
/**
|
2005-08-02 13:35:19 +00:00
|
|
|
* Clears cache
|
2004-09-02 23:28:24 +00:00
|
|
|
*/
|
2008-04-09 13:02:34 +00:00
|
|
|
public function clear() {
|
2015-07-26 23:07:59 +00:00
|
|
|
$this->mGoodLinks->clear();
|
|
|
|
|
$this->mBadLinks->clear();
|
2005-05-29 10:17:44 +00:00
|
|
|
}
|
2003-07-06 11:42:42 +00:00
|
|
|
}
|