Пример #1
0
        public void Clear()
        {
            if (m_logLevel >= 2)
            {
                MainConsole.Instance.Debug("[FLOTSAM ASSET CACHE]: Clearing Cache.");
            }

            lock (m_fileCacheLock)
            {
                foreach (string dir in Directory.GetDirectories(m_CacheDirectory))
                {
                    Directory.Delete(dir, true);
                }
            }

            if (m_MemoryCacheEnabled)
            {
                m_MemoryCache.Clear();
            }

            if (_assetMonitor != null)
            {
                _assetMonitor.ClearAssetCacheStatistics();
            }
        }
Пример #2
0
        public void Clear()
        {
            if (m_logLevel >= 2)
            {
                MainConsole.Instance.Debug("[FLOTSAM ASSET CACHE]: Clearing Cache.");
            }

            lock (m_fileCacheLock)
            {
                foreach (string dir in Directory.GetDirectories(m_CacheDirectory))
                {
                    Directory.Delete(dir, true);
                }
            }

            if (m_MemoryCacheEnabled)
            {
                m_MemoryCache.Clear();
            }

            IAssetMonitor monitor =
                (IAssetMonitor)
                m_simulationBase.ApplicationRegistry.RequestModuleInterface <IMonitorModule>().GetMonitor("",
                                                                                                          MonitorModuleHelper
                                                                                                          .
                                                                                                          AssetMonitor);

            if (monitor != null)
            {
                monitor.ClearAssetCacheStatistics();
            }
        }