Github user pvillard31 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2150#discussion_r149351709
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
---
@@ -1093,6 +1133,19 @@ private Charset getCharsetFromMediaType(MediaType
contentType) {
return contentType != null ?
contentType.charset(StandardCharsets.UTF_8) : StandardCharsets.UTF_8;
}
+ /**
+ * Retrieve the directory in which OkHttp should cache responses. This
method opts
+ * to use a temp directory to write the cache, which means that the
cache will be written
+ * to a new location each time this processor is scheduled.
+ *
+ * Ref: https://github.com/square/okhttp/wiki/Recipes#response-caching
+ *
+ * @return the directory in which the ETag cache should be written
+ */
+ private static File getETagCacheDir() {
+ return Files.createTempDir();
--- End diff --
@MikeThomsen - true but one temporary folder is created each time the
processor is started. We could assume that the processor is going to be
stopped/started a lot. But I agree, this is a edge case. I'm fine with the
current implementation. If I really want to be meticulous I could suggest to
add this information in the property description :)
---