Index: branches/wmf-deployment/includes/filerepo/LocalRepo.php |
— | — | @@ -83,9 +83,9 @@ |
84 | 84 | $title = Title::makeTitle( NS_FILE, $title->getText() ); |
85 | 85 | } |
86 | 86 | |
87 | | - $memcKey = $this->getSharedCacheKey( 'image_redirect', md5( $title->getPrefixedDBkey() ) ); |
| 87 | + $memcKey = $this->getSharedCacheKey( 'image_redirect', md5( $title->getDBkey() ) ); |
88 | 88 | if ( $memcKey === false ) { |
89 | | - $memcKey = $this->getLocalCacheKey( 'image_redirect', md5( $title->getPrefixedDBkey() ) ); |
| 89 | + $memcKey = $this->getLocalCacheKey( 'image_redirect', md5( $title->getDBkey() ) ); |
90 | 90 | $expiry = 300; // no invalidation, 5 minutes |
91 | 91 | } else { |
92 | 92 | $expiry = 86400; // has invalidation, 1 day |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | // Does not exist |
97 | 97 | return false; |
98 | 98 | } elseif ( strval( $cachedValue ) !== '' ) { |
99 | | - return Title::newFromText( $cachedValue ); |
| 99 | + return Title::newFromText( $cachedValue, NS_FILE ); |
100 | 100 | } // else $cachedValue is false or null: cache miss |
101 | 101 | |
102 | 102 | $id = $this->getArticleID( $title ); |
— | — | @@ -111,9 +111,9 @@ |
112 | 112 | __METHOD__ |
113 | 113 | ); |
114 | 114 | |
115 | | - if( $row ) { |
| 115 | + if( $row && $row->rd_namespace == NS_FILE ) { |
116 | 116 | $targetTitle = Title::makeTitle( $row->rd_namespace, $row->rd_title ); |
117 | | - $wgMemc->set( $memcKey, $targetTitle->getPrefixedDBkey(), $expiry ); |
| 117 | + $wgMemc->set( $memcKey, $targetTitle->getDBkey(), $expiry ); |
118 | 118 | return $targetTitle; |
119 | 119 | } else { |
120 | 120 | $wgMemc->set( $memcKey, '', $expiry ); |
— | — | @@ -193,7 +193,7 @@ |
194 | 194 | */ |
195 | 195 | function invalidateImageRedirect( $title ) { |
196 | 196 | global $wgMemc; |
197 | | - $memcKey = $this->getSharedCacheKey( 'image_redirect', md5( $title->getPrefixedDBkey() ) ); |
| 197 | + $memcKey = $this->getSharedCacheKey( 'image_redirect', md5( $title->getDBkey() ) ); |
198 | 198 | if ( $memcKey ) { |
199 | 199 | $wgMemc->delete( $memcKey ); |
200 | 200 | } |
Property changes on: branches/wmf-deployment/includes/filerepo |
___________________________________________________________________ |
Name: svn:mergeinfo |
201 | 201 | + /branches/REL1_15/phase3/includes/filerepo:51646 |
/branches/wmf-deployment/includes/filerepo:53381 |
/trunk/phase3/includes/filerepo:56213,56215-56216,56218,56334-56336,56338,56340,56343,56345,56347,56350,57388-57389,57434 |