clarkwinkelmann When the javascript is generated, the TextFormatter library is compiled if necessary to output the javascript part. I think it will also cause the PHP part to be compiled and cached.
Is it not working for you?
Well I didn't test it yet myself, but it was not clear based on the description. In fact what would be more useful to me would be some kind of refresh()
function in addition to the current flush()
in the Formatter
object to refresh the formatter's cache from an extension.
Currently the best I can do is call flush()
from my command, but as I scheduled the command to run daily it would be interesting to warm up the cache after flushing it.
I saw from the code that I could call getJs()
function as it is a public method that calls getComponent()
(which in turns fills the cache), but it would be a hack.
Sorry this comment drifted into some kind of unrelated feature request for the core. ๐