< 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: 28
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 JetBrains.Annotations;
 5using Microsoft.Extensions.DependencyInjection;
 6
 7namespace Elsa.Http.ShellFeatures;
 8
 9/// <summary>
 10/// Installs services related to HTTP caching.
 11/// </summary>
 12[ShellFeature(
 13    DisplayName = "HTTP Cache",
 14    Description = "Provides HTTP workflow caching for improved performance",
 15    DependsOn = ["Http", "CachingWorkflowDefinitions"])]
 16[UsedImplicitly]
 17public class HttpCacheFeature : IShellFeature
 18{
 19    public void ConfigureServices(IServiceCollection services)
 20    {
 021        services
 022            .AddSingleton<IHttpWorkflowsCacheManager, HttpWorkflowsCacheManager>()
 023            .Decorate<IHttpWorkflowLookupService, CachingHttpWorkflowLookupService>()
 024            .AddNotificationHandler<InvalidateHttpWorkflowsCache>();
 025    }
 26}
 27
 28