Try harder to avoid parser cache pollution
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 12 May 2017 21:38:12 +0000 (17:38 -0400)
committerAnomie <bjorsch@wikimedia.org>
Mon, 5 Jun 2017 14:17:28 +0000 (14:17 +0000)
commit0facbe3e3dfa4df81c01323b5f2aeacf880a1054
tree254e7c0e9f6de0c9b390eb3320698737efa2dabc
parente4930c996bc52d81528614c105ce74c3a0063610
Try harder to avoid parser cache pollution

* ParserOptions is reorganized so it knows all the options and their
  defaults, and can report whether the non-key options are at their
  defaults.
* Definition of the "canonical" ParserOptions (which is unfortunately
  different from the "default" ParserOptions) is moved from
  ContentHandler to ParserOptions.
* WikiPage uses this to throw an exception if it's asked to cache
  with options that aren't used in the cache key.
* ParserCache gets some temporary code to try to avoid a massive cache
  stampede on upgrade.

Bug: T110269
Change-Id: I7fb9ffca96e6bd04db44d2d5f2509ec96ad9371f
Depends-On: I4070a8f51927121f690469716625db4a1064dea5
RELEASE-NOTES-1.30
docs/hooks.txt
includes/content/ContentHandler.php
includes/page/WikiPage.php
includes/parser/ParserCache.php
includes/parser/ParserOptions.php
tests/phpunit/includes/deferred/LinksUpdateTest.php
tests/phpunit/includes/parser/ParserOptionsTest.php