I am looking for a way to apply caching to an existing camel route in my web app so that if the request received can be resolved from the cache then route execution would be skipped. If not the route would be executed and its response would then be added to the cache.
I want to transparently apply caching in a decoupled manner in such that it would have no impact on route logic along with option to enable/disable them I see the following ways to do it 1.Apache Camel RoutePolicy 2.Apache Camel intercepts support 3.Servlet filters But not sure if camel intercepts support pre and post processing of request and response in a similar way as servlet filters. I feel RoutePolicy can be leveraged for this use case, but not sure if it supports pre and post processing of request and response to the route and also activating/deactivating them in a configurable way. Servlet filters would work but they are coupled to the web layer but still they can be enabled/disabled in web config. I feel there might be more effort involved in using them. Can someone help me in deciding the best workable approach for my requirement. -- View this message in context: http://camel.465427.n5.nabble.com/Apply-Caching-to-a-apache-camel-route-tp5773947.html Sent from the Camel - Users mailing list archive at Nabble.com.
