Index: trunk/extensions/ExternalData/ED_Utils.php |
— | — | @@ -506,7 +506,9 @@ |
507 | 507 | } |
508 | 508 | if ( $page != '' ) { |
509 | 509 | $dbw = wfGetDB( DB_MASTER ); |
510 | | - // insert contents into the cache table |
| 510 | + // Delete the old entry, if one exists. |
| 511 | + $dbw->delete( $edgCacheTable, array( 'url' => substr( $url, 0, 254 ))); |
| 512 | + // Insert contents into the cache table. |
511 | 513 | $dbw->insert( $edgCacheTable, array( 'url' => substr( $url, 0, 254 ), 'result' => $page, 'req_time' => time() ) ); |
512 | 514 | return $page; |
513 | 515 | } |