using System; using System.Collections.Generic; using System.Text; using CB.Common; namespace CB.Cache.MemCached { /// /// 设置或载入MemCached的配置 /// /// public class MemCachedConfig { private static object _lockHelper = new object(); private static MemCachedConfigInfo config = null; public static void LoadConfig(string configfilepath) { if (config == null) { lock (_lockHelper) { if (config == null) { config = JSONUtil.ParseFormByJson(Utils.ReadFile(configfilepath)); } } } } /// /// 获取配置 /// /// public static MemCachedConfigInfo GetConfig() { return config; } } }