You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/03/30 09:51:33 UTC

[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #1804: feat: add override_cache_control

Xuanwo commented on code in PR #1804:
URL: https://github.com/apache/incubator-opendal/pull/1804#discussion_r1153016277


##########
core/src/types/ops.rs:
##########
@@ -264,6 +265,17 @@ impl OpRead {
     pub fn override_content_disposition(&self) -> Option<&str> {
         self.override_content_disposition.as_deref()
     }
+
+    /// Sets the cache-control header that should be send back by the remote read operation.
+    pub fn with_override_cache_control(mut self, cache_control: impl Into<String>) -> Self {

Review Comment:
   Oh, I missed this. Please use `&str` directly instead of introducing generics in non-critical code paths.
   
   `with_override_content_disposition` should also be changed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org