Skip to content

Commit a352c42

Browse files
committed
Merge branch 'release/13.9.3' into release/13.10
# Conflicts: # version.json
2 parents 59ad072 + 9f37db1 commit a352c42

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Umbraco.Cms.Api.Delivery/Caching/DeliveryApiOutputCachePolicy.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ ValueTask IOutputCachePolicy.CacheRequestAsync(OutputCacheContext context, Cance
2323
.RequestServices
2424
.GetRequiredService<IRequestPreviewService>();
2525

26-
context.EnableOutputCaching = requestPreviewService.IsPreview() is false;
26+
IApiAccessService apiAccessService = context
27+
.HttpContext
28+
.RequestServices
29+
.GetRequiredService<IApiAccessService>();
30+
31+
context.EnableOutputCaching = requestPreviewService.IsPreview() is false && apiAccessService.HasPublicAccess();
2732
context.ResponseExpirationTimeSpan = _duration;
2833
context.CacheVaryByRules.HeaderNames = _varyByHeaderNames;
2934

0 commit comments

Comments
 (0)