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