[ https://issues.apache.org/jira/browse/CAMEL-18444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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&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)