nl_tokens: Creates a cache entry for a given template property .
pl_tokens: function _createTemplateCache ( templateProp , view , viewOptions ) { var $template , data , html , customLoader = Backbone . DeclarativeViews . custom . loadTemplate , defaultLoader = Backbone . DeclarativeViews . defaults . loadTemplate , modifiedDefaultLoader = defaultLoader !== loadTemplate , cacheId = templateProp ; // Load the template try { $template = customLoader ? customLoader ( templateProp , view , viewOptions ) : defaultLoader ( templateProp , view , viewOptions ) ; } catch ( <mask> ) { // Rethrow and exit if the alarm has been raised deliberately, using an error type of Backbone.DeclarativeViews. if ( _isDeclarativeViewsErrorType ( err ) ) throw err ; // Otherwise, continue without having fetched a template. $template = "" ; } if ( ( customLoader || modifiedDefaultLoader ) && $template !== "" && ! ( $template instanceof Backbone . $ ) ) { throw new CustomizationError ( "Invalid return value. The " + ( customLoader ? "custom" : "default" ) + " loadTemplate function must return a jQuery instance, but it hasn't" ) ; } // Create cache entry if ( $template . length ) { // Read the el-related data attributes of the template. data = _getDataAttributes ( $template ) ; html = $template . html ( ) ; templateCache [ cacheId ] = { html : html , compiled : _tryCompileTemplate ( html , $template ) , tagName : data . tagName , className : data . className , id : data . id , attributes : data . attributes , // Data store for plugins. Plugins should create their own namespace in the store, with the plugin name // as key. _pluginData : { } } ; events . trigger ( "cacheEntry:create" , templateCache [ cacheId ] , templateProp , view , viewOptions ) ; } else { templateCache [ cacheId ] = { invalid : true } ; } return templateCache [ cacheId ] ; }