[jira] [Commented] (CAMEL-18444) camel-caffeine - Caffeine-cache query parameter action does not work
[ https://issues.apache.org/jira/browse/CAMEL-18444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17598345#comment-17598345 ] Marat Gubaidullin commented on CAMEL-18444: --- Expression support would be also great {code:java} caffeine-cache://${header.cache}?key=${header.key}=GET=${header.value} {code} > 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 >Assignee: Claus Ibsen >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=1") > .setBody(constant("VALUE_2")) > .to("caffeine-cache://cache?key=1=GET") > .log("Result1: ${body}, > ${header.CamelCaffeineActionHasResult}"); > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CAMEL-18444) camel-caffeine - Caffeine-cache query parameter action does not work
[ https://issues.apache.org/jira/browse/CAMEL-18444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17598221#comment-17598221 ] Claus Ibsen commented on CAMEL-18444: - We should make this work the same, so "cache" is not private per endpoint, but we use the component to track caches - this is how we do it in seda and other components. > 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=1") > .setBody(constant("VALUE_2")) > .to("caffeine-cache://cache?key=1=GET") > .log("Result1: ${body}, > ${header.CamelCaffeineActionHasResult}"); > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CAMEL-18444) camel-caffeine - Caffeine-cache query parameter action does not work
[ https://issues.apache.org/jira/browse/CAMEL-18444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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=1") > .setBody(constant("VALUE_2")) > .to("caffeine-cache://cache?key=1=GET") > .log("Result1: ${body}, > ${header.CamelCaffeineActionHasResult}"); > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CAMEL-18444) camel-caffeine - Caffeine-cache query parameter action does not work
[ https://issues.apache.org/jira/browse/CAMEL-18444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17598186#comment-17598186 ] Andrea Cosentino commented on CAMEL-18444: -- You need to bind the cache "cache" to the registry, otherwise in the GET action a cache named "cache" will be re-instantiated from scratch. > 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=1") > .setBody(constant("VALUE_2")) > .to("caffeine-cache://cache?key=1=GET") > .log("Result1: ${body}, > ${header.CamelCaffeineActionHasResult}"); > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)