/// <summary> /// Sets up the ObjectCache with the given settings. /// </summary> /// <returns>True if the object cache was set with the sepcified settings, false if it is already initialized.</returns> public static bool Initialize(ServerObjectCacheSettings settings) { lock (settingsLock) { if (ServerObjectCache.settings == null) { ServerObjectCache.settings = settings; return(true); } } return(false); }
/// <summary> /// Initializes the object cache. /// </summary> /// <remarks> /// Normally, initializing the object cache is handled for you when you create a server or client /// however there are times when it is necessary to initialize it without creating a server or client /// such as during testing. This method can be used to initialize the cache in those circumstances. /// /// If the cache is already initialized this method will do nothing. /// /// This method will also initialize the <see cref="ObjectCache"/>. /// </remarks> /// <param name="settings"></param> //DR3 Make static public void InitializeObjectCache(ServerObjectCacheSettings settings) { ObjectCache.Initialize(settings); ServerObjectCache.Initialize(settings); }