Example #1
0
        public ProjectCacheService(Workspace workspace, int implicitCacheTimeout)
        {
            _workspace = workspace;

            _implicitCache        = new SimpleMRUCache();
            _implicitCacheMonitor = new ImplicitCacheMonitor(this, implicitCacheTimeout);
        }
Example #2
0
        public ProjectCacheService(Workspace workspace, int implicitCacheTimeout, bool forceCleanup = false)
        {
            _workspace = workspace;

            // forceCleanup is for testing
            if (workspace?.Kind == WorkspaceKind.Host || forceCleanup)
            {
                // monitor implicit cache for host
                _implicitCacheMonitor = new ImplicitCacheMonitor(this, implicitCacheTimeout);
            }
        }
Example #3
0
        public ProjectCacheService(Workspace workspace, int implicitCacheTimeout)
        {
            _workspace = workspace;

            // Only create implicit cache for Visual Studio Workspace (the cost of the
            // cache likely outweighs the benefit for the other types of Workspaces).
            if (workspace?.Kind == WorkspaceKind.Host)
            {
                _implicitCache        = new SimpleMRUCache();
                _implicitCacheMonitor = new ImplicitCacheMonitor(this, implicitCacheTimeout);
            }
        }