< Summary

Information
Class: Elsa.Http.Features.HttpCacheFeature
Assembly: Elsa.Http
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Features/HttpCacheFeature.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 31
Line coverage: 100%
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
.ctor(...)100%11100%
Apply()100%11100%

File(s)

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

#LineLine coverage
 1using Elsa.Features.Abstractions;
 2using Elsa.Features.Attributes;
 3using Elsa.Features.Services;
 4using Elsa.Http.Handlers;
 5using Elsa.Http.Services;
 6using Elsa.Workflows.Management.Features;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.Http.Features;
 10
 11/// <summary>
 12/// Installs services related to HTTP caching.
 13/// </summary>
 14[DependsOn(typeof(HttpFeature))]
 15[DependsOn(typeof(CachingWorkflowDefinitionsFeature))]
 16public class HttpCacheFeature : FeatureBase
 17{
 18    /// <inheritdoc />
 119    public HttpCacheFeature(IModule module) : base(module)
 20    {
 121    }
 22
 23    /// <inheritdoc />
 24    public override void Apply()
 25    {
 126        Services
 127            .AddSingleton<IHttpWorkflowsCacheManager, HttpWorkflowsCacheManager>()
 128            .Decorate<IHttpWorkflowLookupService, CachingHttpWorkflowLookupService>()
 129            .AddNotificationHandler<InvalidateHttpWorkflowsCache>();
 130    }
 31}