|
@@ 343-347 (lines=5) @@
|
| 340 |
|
$changed = $changed || ( $row->page_latest != $templates[$row->ns][$row->dbk] ); |
| 341 |
|
} |
| 342 |
|
|
| 343 |
|
if ( $changed || $res->numRows() != $templateUses ) { |
| 344 |
|
$stats->increment( 'editstash.cache_misses.proven_stale' ); |
| 345 |
|
$logger->info( "Stale cache for key '$key'; template changed. (age: $age sec)" ); |
| 346 |
|
return false; |
| 347 |
|
} |
| 348 |
|
} |
| 349 |
|
|
| 350 |
|
$files = []; // conditions to find changes/creations |
|
@@ 367-371 (lines=5) @@
|
| 364 |
|
$changed = $changed || ( $row->img_sha1 != $files[$row->name] ); |
| 365 |
|
} |
| 366 |
|
|
| 367 |
|
if ( $changed || $res->numRows() != count( $files ) ) { |
| 368 |
|
$stats->increment( 'editstash.cache_misses.proven_stale' ); |
| 369 |
|
$logger->info( "Stale cache for key '$key'; file changed. (age: $age sec)" ); |
| 370 |
|
return false; |
| 371 |
|
} |
| 372 |
|
} |
| 373 |
|
|
| 374 |
|
$stats->increment( 'editstash.cache_hits.proven_fresh' ); |