diff --git a/src/OrchardCore/OrchardCore.Media.Core/Events/DefaultMediaFileStoreCacheEventHandler.cs b/src/OrchardCore/OrchardCore.Media.Core/Events/DefaultMediaFileStoreCacheEventHandler.cs index 58d6bcf7c4b..bace86eed14 100644 --- a/src/OrchardCore/OrchardCore.Media.Core/Events/DefaultMediaFileStoreCacheEventHandler.cs +++ b/src/OrchardCore/OrchardCore.Media.Core/Events/DefaultMediaFileStoreCacheEventHandler.cs @@ -12,23 +12,11 @@ public DefaultMediaFileStoreCacheEventHandler(IMediaFileStoreCacheFileProvider m } public override Task MediaDeletedDirectoryAsync(MediaDeletedContext context) - { - _mediaFileStoreCacheFileProvider.TryDeleteDirectoryAsync(context.Path); - - return Task.CompletedTask; - } + => _mediaFileStoreCacheFileProvider.TryDeleteDirectoryAsync(context.Path); public override Task MediaDeletedFileAsync(MediaDeletedContext context) - { - _mediaFileStoreCacheFileProvider.TryDeleteFileAsync(context.Path); - - return Task.CompletedTask; - } + => _mediaFileStoreCacheFileProvider.TryDeleteFileAsync(context.Path); public override Task MediaMovedAsync(MediaMoveContext context) - { - _mediaFileStoreCacheFileProvider.TryDeleteFileAsync(context.OldPath); - - return Task.CompletedTask; - } + => _mediaFileStoreCacheFileProvider.TryDeleteFileAsync(context.OldPath); }