Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php |
— | — | @@ -225,14 +225,19 @@ |
226 | 226 | $this->doDataUpdate( $data ); |
227 | 227 | |
228 | 228 | // Invalidate the page, so data stored on it gets displayed immeditaely in queries. |
229 | | - global $smwgAutoRefreshSubject; |
| 229 | + global $smwgAutoRefreshSubject, $wgDBtype; |
230 | 230 | if ( $smwgAutoRefreshSubject && !wfReadOnly() ) { |
231 | 231 | $title = $data->getSubject()->getTitle(); |
232 | 232 | $dbw = wfGetDB( DB_MASTER ); |
| 233 | + $ts = $dbw->timestamp(); |
233 | 234 | |
| 235 | + if ( $wgDBtype == 'mysql' ) { |
| 236 | + $ts += 9001; // This is a hack to invalidate the page cache after the save completes, so it re-renders. |
| 237 | + } |
| 238 | + |
234 | 239 | $dbw->update( |
235 | 240 | 'page', |
236 | | - array( 'page_touched' => $dbw->timestamp() + 9001 ), |
| 241 | + array( 'page_touched' => $ts ), |
237 | 242 | $title->pageCond(), |
238 | 243 | __METHOD__ |
239 | 244 | ); |