1 Reply Latest reply on Apr 8, 2011 3:41 AM by davsclaus

    camel-cache will never get cached object when asking cache with null body.

    nannou9_piotr

      Hi guys!

       

      I'm having another problem with camel-cache endpoint.

      I have something like this:

       

      Exchange response = cacheProducerTemplate.request(cacheEndpointUri, new Processor() {

           @Override

           public void process(Exchange ex) throws Exception {

                ex.getIn().copyFrom(exchange.getIn());

                //ex.getIn().setBody(null); //FIXME- WHY I DO HAVE SEND THE BODY?

           }

      });

       

      The problem is, that when I uncomment ex.getIn().setBody(null); i will never get cached object, even if it is stored in cache!?

      Why do we need the body at all? As the only thing we want is to check if object is cached and all we need are right headers like: CACHE_OPERATION=GET, CACHE_KEY=1234567890.

       

      It seems to be wrong so I am assuming it's a BUG

       

      Am I wrong?

       

      Greetings,

      Piotr Klimczak

       

      Edited by: nannou9 on Apr 7, 2011 11:50 AM