epugh commented on code in PR #4011:
URL: https://github.com/apache/solr/pull/4011#discussion_r2664740615


##########
solr/core/src/java/org/apache/solr/core/SolrConfig.java:
##########
@@ -684,23 +686,17 @@ public HttpCachingConfig getHttpCachingConfig() {
     return httpCachingConfig;
   }
 
-  public static class HttpCachingConfig implements MapSerializable {
+  public static class HttpCachingConfig implements MapWriter {
 
     /** For extracting Expires "ttl" from <cacheControl> config */
     private static final Pattern MAX_AGE = 
Pattern.compile("\\bmax-age=(\\d+)");
 
     @Override
-    public Map<String, Object> toMap(Map<String, Object> map) {
-      // Could have nulls
-      return Utils.makeMap(
-          "never304",
-          never304,
-          "etagSeed",
-          etagSeed,
-          "lastModFrom",
-          lastModFrom.name().toLowerCase(Locale.ROOT),
-          "cacheControl",
-          cacheControlHeader);
+    public void writeMap(EntryWriter ew) throws IOException {
+      ew.put("never304", never304)

Review Comment:
   this is nicer pattern, less a "unique magic pattern".



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to