Beispiel #1
0
 public static void Save(SiteSettings settings)
 {
     if (settings.IsDistributorSettings)
     {
         SiteSettingsProvider.Instance().SaveDistributorSettings(settings);
         HiCache.Remove(string.Format("DataCache-Settings:{0}", settings.SiteUrl));
         return;
     }
     SettingsManager.smethod_1(settings);
     HiCache.Remove("FileCache-MasterSettings");
 }
        public static SiteSettings GetSiteSettings()
        {
            string       siteUrl             = HiContext.Current.SiteUrl;
            string       key                 = string.Format("DataCache-Settings:{0}", siteUrl);
            SiteSettings distributorSettings = HiCache.Get(key) as SiteSettings;

            if (distributorSettings != null)
            {
                return(distributorSettings);
            }
            distributorSettings = SiteSettingsProvider.Instance().GetDistributorSettings(siteUrl);
            if (distributorSettings != null)
            {
                HiCache.Insert(key, distributorSettings, null, 180);
                return(distributorSettings);
            }
            return(GetMasterSettings(true));
        }
 public static SiteSettings GetSiteSettings(int distributorUserId)
 {
     return(SiteSettingsProvider.Instance().GetDistributorSettings(distributorUserId));
 }