Skip to content

Commit

Permalink
Fix setting cache key policy
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanjan90 committed Oct 20, 2023
1 parent 2f3ecfc commit fa1de0e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.List;
import java.util.stream.Collectors;

import com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy;
import gyro.core.resource.Diffable;
import gyro.core.resource.Output;
import gyro.core.resource.Updatable;
Expand Down Expand Up @@ -273,7 +272,7 @@ com.google.cloud.compute.v1.BackendBucketCdnPolicy toBackendBucketCdnPolicy() {
return com.google.cloud.compute.v1.BackendBucketCdnPolicy.newBuilder()
.setSignedUrlCacheMaxAgeSec(getSignedUrlMaxAge())
.setCacheMode(getCacheMode())
.setCacheKeyPolicy(BackendBucketCdnPolicyCacheKeyPolicy.newBuilder().build())
.setCacheKeyPolicy(getCacheKeyPolicy() != null ? getCacheKeyPolicy().toBackendBucketCdnPolicyCacheKeyPolicy() : new BackendBucketCdnCacheKeyPolicy().toBackendBucketCdnPolicyCacheKeyPolicy())
.addAllBypassCacheOnRequestHeaders(getBypassCacheOnRequestHeader().stream()
.map(BackendBucketCdnBypassCacheOnRequestHeader::toBackendBucketCdnPolicyBypassCacheOnRequestHeader)
.collect(Collectors.toList()))
Expand Down

0 comments on commit fa1de0e

Please sign in to comment.