mgubaidullin commented on issue #1067:
URL: https://github.com/apache/camel-karavan/issues/1067#issuecomment-1895951284

   Thanks @davsclaus and @oscerd 
   
   @samar-elsayed you can not put header directly to Caffeine. Set the data you 
want to cache to exchange body and then put into caffeine cache. In the second 
route get data from caffeine (it will be in exchange body) and then setHeader 
from the body.
   
   ```
   - route:
       id: route-cbf4
       nodePrefixId: route-1f7
       from:
         id: from-7856
         uri: kamelet:timer-source
         parameters:
           message: Hello
         steps:
           - setBody:
               id: setBody-eaa0
               expression:
                 simple:
                   id: simple-3dc1
                   expression: ${date:now}
           - to:
               id: to-604c
               uri: caffeine-cache
               parameters:
                 cacheName: demo1
                 action: PUT
                 key: key1
   - route:
       id: route-778e
       nodePrefixId: route-289
       from:
         id: from-aedc
         uri: kamelet:timer-source
         parameters:
           message: world
         steps:
           - to:
               id: to-191e
               uri: caffeine-cache
               parameters:
                 cacheName: demo1
                 action: GET
                 key: key1
           - log:
               id: log-d474
               message: ${body}
   ```
   


-- 
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: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to