diff --git a/scripts/util/purge_cache.php b/scripts/util/purge_cache.php index 8db1063a54..5c8da7b0bb 100755 --- a/scripts/util/purge_cache.php +++ b/scripts/util/purge_cache.php @@ -2,7 +2,7 @@ establishConnection('w'), - 'TRUNCATE TABLE %T', - DifferentialChangeset::TABLE_CACHE); + if ($changesets) { + echo "Purging changeset cache for changesets ". + implode($changesets, ",")."\n"; + queryfx( + $table->establishConnection('w'), + 'DELETE FROM %T WHERE id IN (%Ld)', + DifferentialChangeset::TABLE_CACHE, + $changesets); + } else { + echo "Purging changeset cache...\n"; + queryfx( + $table->establishConnection('w'), + 'TRUNCATE TABLE %T', + DifferentialChangeset::TABLE_CACHE); + } echo "Done.\n"; } @@ -98,7 +118,10 @@ function help() { $help = <<