/// <summary>
        /// Cleanup used resources.
        /// </summary>
        protected override void Cleanup()
        {
            base.Cleanup();

            ScopedReferenceStore storeCache = StoreSafeNamedCache;

            lock (storeCache)
            {
                storeCache.Clear();
            }
        }
        /// <summary>
        /// Releases all the caches fetched from the store and then clears the store.
        /// </summary>
        public virtual void ReleaseCaches()
        {
            ScopedReferenceStore storeCache = StoreRemoteNamedCache;

            lock (storeCache)
            {
                for (IEnumerator iter = storeCache.GetAllCaches().GetEnumerator(); iter.MoveNext();)
                {
                    RemoteNamedCache cache = (RemoteNamedCache)iter.Current;
                    ReleaseRemoteNamedCache(cache as RemoteNamedCache);
                }
                storeCache.Clear();
            }
        }