/// <summary> /// Requests that the configuration be cached to disk. /// </summary> public void CacheIfPossible() { lock (_syncLock) { if (IsActivelyBuilding || IsCached || !IsLoaded || !IsCacheable) { return; } lock (_project) { if (IsCacheable) { INodePacketTranslator translator = GetConfigurationTranslator(TranslationDirection.WriteToStream); try { _project.Cache(translator); _baseLookup = null; IsCached = true; } finally { translator.Writer.BaseStream.Dispose(); } } } } }