I have created a page that will hold reuseable properties for translations throughout the site.
I get the properties from this page with the help of a HtmlHelper.
public static class TranslationHelper
{
public static PageDataBase TranslationPage(this HtmlHelper html)
{
var contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>();
var translationsPageId = WebConfigurationManager.AppSettings.Get("TranslationsPageId");
var page = contentLoader.Get<PageDataBase>(new PageReference(translationsPageId));
return page;
}
}
Could there be a performance hit if this code gets called several times on a page? Should I save/cache the PageData?
I have created a page that will hold reuseable properties for translations throughout the site.
I get the properties from this page with the help of a HtmlHelper.
Could there be a performance hit if this code gets called several times on a page? Should I save/cache the PageData?