< Summary

Information
Class: Elsa.Http.ShellFeatures.HttpCacheFeature
Assembly: Elsa.Http
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/ShellFeatures/HttpCacheFeature.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 32
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ConfigureServices(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/ShellFeatures/HttpCacheFeature.cs

#LineLine coverage
 1using CShells.Features;
 2using Elsa.Http.Handlers;
 3using Elsa.Http.Services;
 4using Elsa.Workflows.Management.ShellFeatures;
 5using Elsa.Platform.PackageManifest.Generator.Hints;
 6using JetBrains.Annotations;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.Http.ShellFeatures;
 10
 11/// <summary>
 12/// Installs services related to HTTP caching.
 13/// </summary>
 14[ManifestFeatureCategory("HTTP")]
 15[ManifestFeatureCategory("Caching")]
 16[ShellFeature(
 17    DisplayName = "HTTP Cache",
 18    Description = "Provides HTTP workflow caching for improved performance",
 19    DependsOn = [typeof(HttpFeature), typeof(CachingWorkflowDefinitionsFeature)])]
 20[UsedImplicitly]
 21public class HttpCacheFeature : IShellFeature
 22{
 23    public void ConfigureServices(IServiceCollection services)
 24    {
 025        services
 026            .AddSingleton<IHttpWorkflowsCacheManager, HttpWorkflowsCacheManager>()
 027            .Decorate<IHttpWorkflowLookupService, CachingHttpWorkflowLookupService>()
 028            .AddNotificationHandler<InvalidateHttpWorkflowsCache>();
 029    }
 30}
 31
 32