Public Member Functions | |
| __construct () | |
| forUpdate ($update=NULL) | |
| General accessor to get/set whether SELECT FOR UPDATE should be used. | |
| getGoodLinkID ($title) | |
| getGoodLinkFieldObj ($title, $field) | |
| Get a field of a title object from cache. | |
| isBadLink ($title) | |
| addGoodLinkObj ($id, $title, $len=-1, $redir=NULL) | |
| Add a link for the title to the link cache. | |
| addBadLinkObj ($title) | |
| clearBadLink ($title) | |
| clearLink ($title) | |
| getGoodLinks () | |
| getBadLinks () | |
| addLink ($title, $len=-1, $redir=NULL) | |
| Add a title to the link cache, return the page_id or zero if non-existent. | |
| addLinkObj (&$nt, $len=-1, $redirect=NULL) | |
| Add a title to the link cache, return the page_id or zero if non-existent. | |
| clear () | |
| Clears cache. | |
Static Public Member Functions | |
| static & | singleton () |
| Get an instance of this class. | |
Public Attributes | |
| $mClassVer = 4 | |
| $mGoodLinks | |
| $mBadLinks | |
| $mForUpdate | |
Definition at line 7 of file LinkCache.php.
| LinkCache::__construct | ( | ) |
Definition at line 26 of file LinkCache.php.
| LinkCache::addBadLinkObj | ( | $ | title | ) |
Definition at line 81 of file LinkCache.php.
References $title, and isBadLink().
Referenced by addLinkObj().
| LinkCache::addGoodLinkObj | ( | $ | id, | |
| $ | title, | |||
| $ | len = -1, |
|||
| $ | redir = NULL | |||
| ) |
Add a link for the title to the link cache.
| int | $id | |
| Title | $title | |
| int | $len | |
| int | $redir |
Definition at line 75 of file LinkCache.php.
References $title.
Referenced by addLinkObj().
| LinkCache::addLink | ( | $ | title, | |
| $ | len = -1, |
|||
| $ | redir = NULL | |||
| ) |
Add a title to the link cache, return the page_id or zero if non-existent.
| $title | String: title to add | |
| $len | int, page size | |
| $redir | bool, is redirect? |
Definition at line 115 of file LinkCache.php.
References $title, addLinkObj(), and Title::newFromDBkey().
| LinkCache::addLinkObj | ( | &$ | nt, | |
| $ | len = -1, |
|||
| $ | redirect = NULL | |||
| ) |
Add a title to the link cache, return the page_id or zero if non-existent.
| $nt | Title to add. | |
| $len | int, page size | |
| $redir | bool, is redirect? |
Definition at line 131 of file LinkCache.php.
References $db, $key, $options, $s, $wgAntiLockFlags, addBadLinkObj(), addGoodLinkObj(), getGoodLinkID(), isBadLink(), wfGetDB(), wfProfileIn(), and wfProfileOut().
Referenced by addLink().
| LinkCache::clear | ( | ) |
| LinkCache::clearBadLink | ( | $ | title | ) |
| LinkCache::clearLink | ( | $ | title | ) |
| LinkCache::forUpdate | ( | $ | update = NULL |
) |
General accessor to get/set whether SELECT FOR UPDATE should be used.
Definition at line 36 of file LinkCache.php.
References wfSetVar().
| LinkCache::getBadLinks | ( | ) |
Definition at line 106 of file LinkCache.php.
| LinkCache::getGoodLinkFieldObj | ( | $ | title, | |
| $ | field | |||
| ) |
Get a field of a title object from cache.
If this link is not good, it will return NULL.
| Title | $title | |
| string | $field ('length','redirect') |
Definition at line 55 of file LinkCache.php.
References $title.
| LinkCache::getGoodLinkID | ( | $ | title | ) |
| LinkCache::getGoodLinks | ( | ) |
Definition at line 105 of file LinkCache.php.
| LinkCache::isBadLink | ( | $ | title | ) |
Definition at line 64 of file LinkCache.php.
References $title.
Referenced by addBadLinkObj(), and addLinkObj().
| static& LinkCache::singleton | ( | ) | [static] |
Get an instance of this class.
Definition at line 18 of file LinkCache.php.
Referenced by OutputPage::addCategoryLinks(), LinkHolderArray::doVariants(), LinkBatch::execute(), fixLinksFromArticle(), Title::getArticleID(), Title::getLength(), Title::getLinksTo(), File::getLinksTo(), WatchlistEditor::getWatchlistInfo(), WikiRevision::importOldRevision(), Title::isRedirect(), Article::loadPageData(), TitleCleanup::moveInconsistentPage(), LinkHolderArray::replaceInternal(), Title::resetArticleID(), RefreshLinksJob2::run(), RefreshLinksJob::run(), Parser::statelessFetchTemplate(), and ParserTest::teardownGlobals().
| LinkCache::$mBadLinks |
Definition at line 12 of file LinkCache.php.
| LinkCache::$mClassVer = 4 |
Definition at line 10 of file LinkCache.php.
| LinkCache::$mForUpdate |
Definition at line 13 of file LinkCache.php.
| LinkCache::$mGoodLinks |
Definition at line 12 of file LinkCache.php.
1.5.9