public async Task StoreModuleAnalysisAsync(IDocumentAnalysis analysis, bool immediate = false, CancellationToken cancellationToken = default)
        {
            var cachingLevel = GetCachingLevel();

            if (cachingLevel == AnalysisCachingLevel.None)
            {
                return;
            }

            var model = await Task.Run(() => ModuleModel.FromAnalysis(analysis, _services, cachingLevel), cancellationToken);

            if (model != null && !cancellationToken.IsCancellationRequested)
            {
                await _cacheWriter.EnqueueModel(model, immediate, cancellationToken);
            }
        }