コード例 #1
0
        /// <summary>
        /// Flushes all cache items from memory to auxilliary caches and close the auxilliary caches.
        /// Should be invoked only by CacheManager.
        /// </summary>
        public void Dispose()
        {
            try {
                lock (this) {
                    if (_memoryStore != null)
                    {
                        _memoryStore.Dispose();
                        _memoryStore = null;
                    }

                    if (_diskStore != null)
                    {
                        _diskStore.Dispose();
                        _diskStore = null;
                    }

                    _status = Status.Shutdown;
                }

                this.NotificationService.NotifyDisposed(false);
            } finally {
                GC.SuppressFinalize(this);
            }
        }