lburgazzoli commented on code in PR #13456:
URL: https://github.com/apache/camel/pull/13456#discussion_r1521100070
##########
catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java:
##########
@@ -113,13 +131,32 @@ public void setRuntimeProvider(RuntimeProvider
runtimeProvider) {
this.runtimeProvider = runtimeProvider;
// inject CamelCatalog to the provider
this.runtimeProvider.setCamelCatalog(this);
+
// invalidate the cache
cache.remove(FIND_COMPONENT_NAMES);
+ cache.remove(FIND_COMPONENT_LABELS);
cache.remove(LIST_COMPONENTS_AS_JSON);
+
cache.remove(FIND_DATA_FORMAT_NAMES);
+ cache.remove(FIND_DATA_FORMAT_LABELS);
cache.remove(LIST_DATA_FORMATS_AS_JSON);
+
cache.remove(FIND_LANGUAGE_NAMES);
+ cache.remove(FIND_LANGUAGE_LABELS);
cache.remove(LIST_LANGUAGES_AS_JSON);
+
+ cache.remove(FIND_OTHER_NAMES);
+ cache.remove(FIND_OTHER_LABELS);
+ cache.remove(LIST_OTHERS_AS_JSON);
+
+ cache.remove(FIND_MODEL_NAMES);
+ cache.remove(FIND_MODEL_LABELS);
+ cache.remove(LIST_MODELS_AS_JSON);
+
+ cache.remove(FIND_TRANSFORMER_NAMES);
+ cache.remove(LIST_TRANSFORMERS_AS_JSON);
+
+ cache.remove(SUMMARY_AS_JSON);
Review Comment:
@davsclaus I don't know if this was intentional but saw a number of element
of the cache not being removed when a new runtime provider is set so I removed
them. Maybe cleaning up the whole cache and re-cache some of the element
upfront would be better ?
--
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]