Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -1741,7 +1741,7 @@ |
1742 | 1742 | } |
1743 | 1743 | |
1744 | 1744 | function wfGetCachedNotice( $name ) { |
1745 | | - global $wgOut, $parserMemc; |
| 1745 | + global $wgOut, $wgRenderHashAppend, $parserMemc; |
1746 | 1746 | $fname = 'wfGetCachedNotice'; |
1747 | 1747 | wfProfileIn( $fname ); |
1748 | 1748 | |
— | — | @@ -1763,7 +1763,9 @@ |
1764 | 1764 | } |
1765 | 1765 | } |
1766 | 1766 | |
1767 | | - $cachedNotice = $parserMemc->get( wfMemcKey( $name ) ); |
| 1767 | + // Use the extra hash appender to let eg SSL variants separately cache. |
| 1768 | + $key = wfMemcKey( $name . $wgRenderHashAppend ); |
| 1769 | + $cachedNotice = $parserMemc->get( $key ); |
1768 | 1770 | if( is_array( $cachedNotice ) ) { |
1769 | 1771 | if( md5( $notice ) == $cachedNotice['hash'] ) { |
1770 | 1772 | $notice = $cachedNotice['html']; |
— | — | @@ -1777,7 +1779,7 @@ |
1778 | 1780 | if( $needParse ) { |
1779 | 1781 | if( is_object( $wgOut ) ) { |
1780 | 1782 | $parsed = $wgOut->parse( $notice ); |
1781 | | - $parserMemc->set( wfMemcKey( $name ), array( 'html' => $parsed, 'hash' => md5( $notice ) ), 600 ); |
| 1783 | + $parserMemc->set( $key, array( 'html' => $parsed, 'hash' => md5( $notice ) ), 600 ); |
1782 | 1784 | $notice = $parsed; |
1783 | 1785 | } else { |
1784 | 1786 | wfDebug( 'wfGetCachedNotice called for ' . $name . ' with no $wgOut available' ); |