79 if ( !$this->repo->fetchDescription ) {
84 $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $lang->getCode() );
89 $touched = $this->repo->getReplicaDB()->newSelectQueryBuilder()
90 ->select(
'page_touched' )
92 ->where( [
'page_namespace' =>
NS_FILE,
'page_title' => $this->title->getDBkey() ] )
93 ->caller( __METHOD__ )->fetchField();
94 if ( $touched ===
false ) {
98 $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
101 return $cache->getWithSetCallback(
102 $this->repo->getLocalCacheKey(
103 'file-foreign-description',
105 md5( $this->getName() ),
108 $this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
109 static function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl, $fname ) {
110 wfDebug(
"Fetching shared description from $renderUrl" );
111 $res = MediaWikiServices::getInstance()->getHttpRequestFactory()->
112 get( $renderUrl, [], $fname );
114 $ttl = WANObjectCache::TTL_UNCACHEABLE;