Topic on Extension talk:Widgets

What triggers widgets to get cached/compiled?

5
Justin C Lloyd (talkcontribs)

Our wikis have a lot of widgets, some of which I'm seeing get recompiled into the compiled_templates directories many times per minute, even sometimes multiple times in a second. In that particular example, the only thing changing in the compiled code is the JS function name that is randomly generated by the call to PHP uniqid('', true). Is this probably something with how our Widgets are written, or perhaps about how they are used within templates and themselves use templates (it gets messy)? FWIW a while back I opened a Phabricator task on this.

Justin C Lloyd (talkcontribs)

Any thoughts on my question?

Revansx (talkcontribs)

I would like to understand this better too for similar reasons.

Revansx (talkcontribs)
Bawolff (talkcontribs)

it looks like the extension is currently using ParserAfterTidy hook to decide this, which is probably not the most correct option. Something LinksUpdate related would be better (although have to be careful about asyncness of linksupdate)

Reply to "What triggers widgets to get cached/compiled?"