diff --git a/conf/default.conf.php b/conf/default.conf.php index 4e88b69d10..078c4e128d 100644 --- a/conf/default.conf.php +++ b/conf/default.conf.php @@ -557,7 +557,8 @@ return array( // against each regexp in order until one matches. The default configuration // uses a width of 100 for Java and 80 for other languages. Note that 80 is // the greatest column width of all time. Changes here will not be immediately - // reflected in old revisions unless you purge the render cache. + // reflected in old revisions unless you purge the changeset render cache + // (with `./scripts/util/purge_cache.php --changesets`). 'differential.wordwrap' => array( '/\.java$/' => 100, '/.*/' => 80, diff --git a/scripts/util/purge_cache.php b/scripts/util/purge_cache.php new file mode 100755 index 0000000000..8db1063a54 --- /dev/null +++ b/scripts/util/purge_cache.php @@ -0,0 +1,135 @@ +#!/usr/bin/env php +establishConnection('w'), + 'TRUNCATE TABLE %T', + DifferentialChangeset::TABLE_CACHE); + echo "Done.\n"; +} + +if ($purge_differential) { + echo "Purging Differential comment cache...\n"; + $table = new DifferentialComment(); + queryfx( + $table->establishConnection('w'), + 'UPDATE %T SET cache = NULL', + $table->getTableName()); + echo "Done.\n"; +} + +if ($purge_maniphest) { + echo "Purging Maniphest comment cache...\n"; + $table = new ManiphestTransaction(); + queryfx( + $table->establishConnection('w'), + 'UPDATE %T SET cache = NULL', + $table->getTableName()); + echo "Done.\n"; +} + +echo "Ok, caches purged.\n"; + +function usage($message) { + echo "Usage Error: {$message}"; + echo "\n\n"; + echo "Run 'purge_cache.php --help' for detailed help.\n"; + exit(1); +} + +function help() { + $help = <<