- /**
- * Wiki pages often contain multiple links to the same page.
- * Title normalization and parsing can become expensive on
- * pages with many links, so we can save a little time by
- * caching them.
- *
- * In theory these are value objects and won't get changed...
- */
- if ( $defaultNamespace == NS_MAIN && $cache->has( $text ) ) {
- return $cache->get( $text );
+ // Wiki pages often contain multiple links to the same page.
+ // Title normalization and parsing can become expensive on pages with many
+ // links, so we can save a little time by caching them.
+ // In theory these are value objects and won't get changed...
+ if ( $defaultNamespace == NS_MAIN ) {
+ $t = $titleCache->get( $text );
+ if ( $t ) {
+ return $t;
+ }