/// <summary> /// Disposes the build cache instance. /// </summary> public void Dispose() { if (m_Downloader != null) { m_Downloader.Dispose(); } m_Uploader = null; m_Downloader = null; }
public void Dispose() { SyncPendingSaves(); if (m_Uploader != null) m_Uploader.Dispose(); if (m_Downloader != null) m_Downloader.Dispose(); m_Uploader = null; m_Downloader = null; }
public BuildCache(string host, int port = 8126) { m_GlobalHash = CalculateGlobalArtifactVersionHash(); if (string.IsNullOrEmpty(host)) return; m_Uploader = new CacheServerUploader(host, port); m_Downloader = new CacheServerDownloader(this, host, port); }
public BuildCache(string host, int port = 8126) { if (string.IsNullOrEmpty(host)) { return; } m_Uploader = new CacheServerUploader(host, port); m_Downloader = new CacheServerDownloader(this, host, port); }
/// <summary> /// Creates a new remote build cache object. /// </summary> /// <param name="host">The server host.</param> /// <param name="port">The server port.</param> public BuildCache(string host, int port = 8126) { m_GlobalHash = CalculateGlobalArtifactVersionHash(); if (string.IsNullOrEmpty(host)) { return; } try { m_Uploader = new CacheServerUploader(host, port); m_Downloader = new CacheServerDownloader(this, host, port); } catch (Exception e) { m_Uploader = null; m_Downloader = null; string msg = $"Failed to connect build cache to CacheServer. ip: {host}, port: {port}. With exception, \"{e.Message}\""; m_Logger.AddEntrySafe(LogLevel.Warning, msg); UnityEngine.Debug.LogWarning(msg); } }