There is caching around the ChangeTagsListActive and ListDefinedTags
hooks that can be skipped if no callers are registered for them.
Change-Id: I0c8fccc358f80536fff7ad0bda1cab09181bca41
* @since 1.25
*/
public static function listExtensionActivatedTags() {
* @since 1.25
*/
public static function listExtensionActivatedTags() {
+ if ( !Hooks::isRegistered( 'ChangeTagsListActive' ) ) {
+ return [];
+ }
return ObjectCache::getMainWANInstance()->getWithSetCallback(
wfMemcKey( 'active-tags' ),
WANObjectCache::TTL_MINUTE * 5,
return ObjectCache::getMainWANInstance()->getWithSetCallback(
wfMemcKey( 'active-tags' ),
WANObjectCache::TTL_MINUTE * 5,
* @since 1.25
*/
public static function listExtensionDefinedTags() {
* @since 1.25
*/
public static function listExtensionDefinedTags() {
+ if ( !Hooks::isRegistered( 'ListDefinedTags' ) ) {
+ return [];
+ }
return ObjectCache::getMainWANInstance()->getWithSetCallback(
wfMemcKey( 'valid-tags-hook' ),
WANObjectCache::TTL_MINUTE * 5,
return ObjectCache::getMainWANInstance()->getWithSetCallback(
wfMemcKey( 'valid-tags-hook' ),
WANObjectCache::TTL_MINUTE * 5,