[ https://issues.apache.org/jira/browse/CAMEL-18444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17598187#comment-17598187 ]
Andrea Cosentino commented on CAMEL-18444: ------------------------------------------ In the example with the header it is working just because the endpoint it is the same "caffeine-cache://cache?key=1", in that case the endpoint will be re-used. In the case of invoking action the endpoint will be different between first and second invocation, so you'll have a new "cache" cache and the GET won't return any result. > camel-caffeine - Caffeine-cache query parameter action does not work > -------------------------------------------------------------------- > > Key: CAMEL-18444 > URL: https://issues.apache.org/jira/browse/CAMEL-18444 > Project: Camel > Issue Type: Bug > Components: camel-caffeine > Affects Versions: 3.18.1 > Reporter: Marat Gubaidullin > Priority: Major > Fix For: 3.18.2, 3.19.0 > > > Caffeine-cache example using headers works fine: > {code:java} > from("timer:test2") > .setBody(constant("VALUE_1")) > .setHeader("CamelCaffeineAction", constant("PUT")) > .to("caffeine-cache://cache?key=1") > .setBody(constant("VALUE_2")) > .setHeader("CamelCaffeineAction", constant("GET")) > .to("caffeine-cache://cache?key=1") > .log("Result2: ${body}, > ${header.CamelCaffeineActionHasResult}"); > {code} > Same code using query parameter action does not work: > {code:java} > from("timer:test1") > .setBody(constant("VALUE_1")) > .to("caffeine-cache://cache?action=PUT&key=1") > .setBody(constant("VALUE_2")) > .to("caffeine-cache://cache?key=1&action=GET") > .log("Result1: ${body}, > ${header.CamelCaffeineActionHasResult}"); > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)