Example #1
0
        public EditSettingViewModel GetSiteSettings()
        {
            var siteSettings = _httpContext.CacheRead <EditSettingViewModel>(SiteSettingsKey);

            const int durationMinutes = 60;


            if (siteSettings != null)
            {
                return(siteSettings);
            }

            siteSettings = _settingService.GetSettings();
            _httpContext.CacheInsert(SiteSettingsKey, siteSettings, durationMinutes);

            return(siteSettings);
        }