Using Cached Model

To load a page more faster than before like a landing page which has more items we can use     ‘Backbone.CachedModel’ on the model file adding a sample along with this

// Model.js
// -----------------------
// @module Case
define("LandingPages.Main.SS2Model", [
	"Backbone",
	'Backbone.CachedModel',
	"Utils"
], function (
	Backbone,
	BackboneCachedModel,
	Utils
) {
	"use strict";

	return BackboneCachedModel.extend({
		//@property {String} urlRoot
		urlRoot: Utils.getAbsoluteUrl(
			getExtensionAssetsPath(
				"Modules/Main/SuiteScript2/LandingPage.Service.ss"
			),
			true
		)
	});
});

Leave a comment

Your email address will not be published. Required fields are marked *