Skip to content

Commit 46a485b

Browse files
authored
fix: cacheTtl can be negative (#909)
1 parent c92654d commit 46a485b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

worker/src/request_init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ pub struct CfProperties {
122122
/// headers are seen on the response. This is equivalent to setting two page rules: “Edge Cache
123123
/// TTL” and “Cache Level” (to “Cache Everything”). The value must be zero or a positive number.
124124
/// A value of 0 indicates that the cache asset expires immediately.
125-
pub cache_ttl: Option<u32>,
125+
pub cache_ttl: Option<i32>,
126126
/// This option is a version of the cacheTtl feature which chooses a TTL based on the response’s
127127
/// status code. If the response to this request has a status code that matches, Cloudflare will
128128
/// cache for the instructed time, and override cache directives sent by the origin. For

0 commit comments

Comments
 (0)