Remove wasteful double-caching of settings metadata
authorColeman Watts <coleman@civicrm.org>
Thu, 16 May 2019 03:35:14 +0000 (23:35 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 16 May 2019 18:08:21 +0000 (14:08 -0400)
commit1209c8a71c8f980a0bb8d773f3ef9411848f78c1
tree7aa379b4cfc93d2c9f5f4e634fbf8910cbf9af51
parent405192f14cc00abb2428e481888d56910af7ada9
Remove wasteful double-caching of settings metadata

Settings metadata was being cached once per domain and one extra time for good measure.
hook_civicrm_alterSettingsMetaData() was invoked even when fetching cached data,
even though the hook-altered data was stored in the cache.

Now that the hook is invoked only once and the results cached, tests have been tweaked
to cache after setting the hook instead of before.
Civi/Core/SettingsMetadata.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/SettingTest.php