public ProjectCacheService(Workspace workspace, int implicitCacheTimeout) { _workspace = workspace; _implicitCache = new SimpleMRUCache(); _implicitCacheMonitor = new ImplicitCacheMonitor(this, implicitCacheTimeout); }
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); } }
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); } }