public static CustomerServiceSettings GetMasterSettings(bool cacheable)
        {
            if (!cacheable)
            {
                HiCache.Remove("FileCache-CustomerServiceSettings");
            }
            XmlDocument             xmlDocument = HiCache.Get("FileCache-CustomerServiceSettings") as XmlDocument;
            CustomerServiceSettings result;

            if (xmlDocument == null)
            {
                string masterSettingsFilename = CustomerServiceManager.GetMasterSettingsFilename();
                if (!File.Exists(masterSettingsFilename))
                {
                    result = null;
                    return(result);
                }
                xmlDocument = new XmlDocument();
                xmlDocument.Load(masterSettingsFilename);
                if (cacheable)
                {
                    HiCache.Max("FileCache-CustomerServiceSettings", xmlDocument, new CacheDependency(masterSettingsFilename));
                }
            }
            result = CustomerServiceSettings.FromXml(xmlDocument);
            return(result);
        }
        private static void SaveMasterSettings(CustomerServiceSettings settings)
        {
            string      masterSettingsFilename = CustomerServiceManager.GetMasterSettingsFilename();
            XmlDocument xmlDocument            = new XmlDocument();

            if (File.Exists(masterSettingsFilename))
            {
                xmlDocument.Load(masterSettingsFilename);
            }
            settings.WriteToXml(xmlDocument);
            xmlDocument.Save(masterSettingsFilename);
        }
 public static void Save(CustomerServiceSettings settings)
 {
     CustomerServiceManager.SaveMasterSettings(settings);
     HiCache.Remove("FileCache-CustomerServiceSettings");
 }