0.9.4
Features
-
Added the
lazyLangs
andlazyMojits
options, which significantly reduce start up time. By default these options are set to false, and can be set to true under theresourceStore
option in application.json. After a resource is lazy loaded, it does not need to be loaded again in subsequent requests.lazyLangs
andlazyMojits
are ideal options for large applications during development when developers often have to restart an application and don't necessarily use all mojits or languages.-
lazyLangs
only loads the lang files necessary for a given request's lang context; this substantially reduces start up time for applications that have many lang files.Note that
lazyLangs
requires lang files to follow proper naming conventions ({mojitName}_{locale}.js or {mojitName}.js for default lang, e.g. Main_es-ES.js or Main.js); default langs are specified with the empty string within the lang file. -
lazyMojits
only loads mojits as they appear during a request; this option is especially useful for applications with many mojits that don't appear often.Note that if
lazyMojits
is on then YUI modules within mojits must let YUI know of any YUI modules it requires that are outside of the mojit. Usually this is not necessary since mojits are meant to be self contained, but if it is not, then let YUI know of the external YUI module with this code on top of the requiring YUI module:if (typeof YUI === 'function') { // Making sure the PipelineFrame controller is available to this module if lazyMojits is on. YUI().applyConfig({ modules: { PipelineFrameMojit: { fullpath: require('path').join(__dirname, '../PipelineFrame/controller.server.js') } } }); }
-
Bug Fixes
- Fixed issue where the mojito-handler-static middleware was sometimes setting the header max-age value to NaN.