Exemplo n.º 1
0
        private void ReuseCacheFromPool()
        {
            // todo: include InstanceId to the cacheId...
            string           cacheId = string.Format("{0}{1}", File.Filename, GetId());
            ICollectionCache cache   = CachePoolManager.GetCache(cacheId);

            if (cache == null)
            {
                CachePoolManager.SetCache(cacheId, this);
            }
            else
            {
                MruManager = cache.MruManager;
                Blocks     = cache.Blocks;
                MruManager.SetDataStores(this, DataBlockDriver);
            }
        }
Exemplo n.º 2
0
 private void SetupCachePool()
 {
     CachePoolManager.Initialize(File.Profile.MruMinCapacity, File.Profile.MruMaxCapacity);
 }
Exemplo n.º 3
0
 public static void RemoveAllIdleConnections()
 {
     CachePoolManager.RemoveAllIdleConnections();
 }