Index: trunk/extensions/MetavidWiki/includes/MV_ParserCache.php |
— | — | @@ -13,19 +13,22 @@ |
14 | 14 | //avoids conflicts of inline display with full article display |
15 | 15 | class MV_ParserCache extends ParserCache{ |
16 | 16 | var $extraKeyOpt='mv'; |
17 | | - public static function &singleton() { |
| 17 | + var $addToKey =''; |
| 18 | + public static function & singleton() { |
18 | 19 | static $instance; |
19 | 20 | if ( !isset( $instance ) ) { |
20 | 21 | global $parserMemc; |
21 | 22 | $instance = new MV_ParserCache( $parserMemc ); |
22 | 23 | } |
| 24 | + //reset addToKey |
| 25 | + $instance->addToKey=''; |
23 | 26 | return $instance; |
24 | 27 | } |
25 | 28 | function addToKey($opt){ |
26 | | - $this->extraKeyOpt.=$opt; |
| 29 | + $this->addToKey=$opt; |
27 | 30 | } |
28 | 31 | function getKey( &$article, &$user ) { |
29 | | - return parent::getKey( $article, $user ) .$this->extraKeyOpt; |
| 32 | + return parent::getKey( $article, $user ).$this->extraKeyOpt.$this->addToKey; |
30 | 33 | } |
31 | 34 | } |
32 | 35 | ?> |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php |
— | — | @@ -236,8 +236,8 @@ |
237 | 237 | //use the cache by default: |
238 | 238 | //$usepCache = (isset($mvd_page->usePcache))?$mvd_page->usePcache:true; |
239 | 239 | |
240 | | - /*try to pull from cache: (should do new key on edits)*/ |
241 | | - $MvParserCache =& MV_ParserCache::singleton(); |
| 240 | + /*try to pull from cache: seperate out cache for internal links vs external links cache*/ |
| 241 | + $MvParserCache = & MV_ParserCache::singleton(); |
242 | 242 | $add_opt = ($absolute_links)?'a':''; |
243 | 243 | $MvParserCache->addToKey($add_opt); |
244 | 244 | |