You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "zwoop (via GitHub)" <gi...@apache.org> on 2025/07/22 13:12:43 UTC

[PR] Cripts: Refactor the cache key / URL APIs [trafficserver]

zwoop opened a new pull request, #12377:
URL: https://github.com/apache/trafficserver/pull/12377

   - cleans up the notion around cached URLs and headers, and cache keys.
   - adds APIs to set the lookup status as well
   
   Note: This was split out of the Cache Groups PR, since this is universally useful / need in Cripts.


-- 
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: github-unsubscribe@trafficserver.apache.org

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


Re: [PR] Cripts: Refactor the cache key / URL APIs [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #12377:
URL: https://github.com/apache/trafficserver/pull/12377#discussion_r2237909595


##########
include/cripts/Matcher.hpp:
##########
@@ -20,8 +20,10 @@
 // Setup for PCRE2
 #define PCRE2_CODE_UNIT_WIDTH 8
 #include <pcre2.h>
+#include <algorithm>
 #include <vector>
 #include <tuple>
+#include <algorithm>

Review Comment:
   Two `algorithm` imports.



##########
include/cripts/Headers.hpp:
##########
@@ -199,21 +163,17 @@ class Header
     self_type &operator+=(const cripts::string_view str);
 
     // These specialized assignment operators all use the above
-    template <size_t N>
-    self_type &
-    operator=(const char (&str)[N])
-    {
-      return operator=(cripts::string_view(str, str[N - 1] ? N : N - 1));
-    }
+    // template <size_t N>
+    // self_type &
+    // operator=(const char (&str)[N])
+    //{
+    //  return operator=(cripts::string_view(str, str[N - 1] ? N : N - 1));
+    //}

Review Comment:
   Maybe just remove this commented out block?



-- 
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: github-unsubscribe@trafficserver.apache.org

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


Re: [PR] Cripts: Refactor the cache key / URL APIs [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #12377:
URL: https://github.com/apache/trafficserver/pull/12377#issuecomment-3129058960

   [approve ci autest 2]


-- 
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: github-unsubscribe@trafficserver.apache.org

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


Re: [PR] Cripts: Refactor the cache key / URL APIs [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #12377:
URL: https://github.com/apache/trafficserver/pull/12377#issuecomment-3120251298

   [approve ci autest 2]


-- 
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: github-unsubscribe@trafficserver.apache.org

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


Re: [PR] Cripts: Refactor the cache key / URL APIs [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop merged PR #12377:
URL: https://github.com/apache/trafficserver/pull/12377


-- 
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: github-unsubscribe@trafficserver.apache.org

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


Re: [PR] Cripts: Refactor the cache key / URL APIs [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #12377:
URL: https://github.com/apache/trafficserver/pull/12377#discussion_r2237946266


##########
include/cripts/Headers.hpp:
##########
@@ -199,21 +163,17 @@ class Header
     self_type &operator+=(const cripts::string_view str);
 
     // These specialized assignment operators all use the above
-    template <size_t N>
-    self_type &
-    operator=(const char (&str)[N])
-    {
-      return operator=(cripts::string_view(str, str[N - 1] ? N : N - 1));
-    }
+    // template <size_t N>
+    // self_type &
+    // operator=(const char (&str)[N])
+    //{
+    //  return operator=(cripts::string_view(str, str[N - 1] ? N : N - 1));
+    //}

Review Comment:
   So, I left it here, because at some point it was needed and useful, but it breaks some dependencies in this new code. Let me add a code here, for clarity.
   



-- 
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: github-unsubscribe@trafficserver.apache.org

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


Re: [PR] Cripts: Refactor the cache key / URL APIs [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on PR #12377:
URL: https://github.com/apache/trafficserver/pull/12377#issuecomment-3129942764

   [approve ci autest 2]


-- 
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: github-unsubscribe@trafficserver.apache.org

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


Re: [PR] Cripts: Refactor the cache key / URL APIs [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #12377:
URL: https://github.com/apache/trafficserver/pull/12377#discussion_r2238034075


##########
include/cripts/Matcher.hpp:
##########
@@ -20,8 +20,10 @@
 // Setup for PCRE2
 #define PCRE2_CODE_UNIT_WIDTH 8
 #include <pcre2.h>
+#include <algorithm>
 #include <vector>
 #include <tuple>
+#include <algorithm>

Review Comment:
   Fixed



-- 
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: github-unsubscribe@trafficserver.apache.org

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