there isn't a "reach through cache" design pattern implementation...that
said, given that both redis/mongdb components support producing/consuming,
this shouldn't be difficult to use along with some simple conditional logic
implemented via a filter or content based router...

here is a pseudo route using a filter...

from("direct:getDataFromRedisOrMongoDB")
    .to("spring-redis...<query>")
    .filter(<no data found>)
         .to("mongodb...<query>")
         .to("spring-redis...<add to cache>")
        .end()
    .to(<process/deliver data>);
    


gmh wrote
> Hi all,
> I have a requirement where we would leverage redis as cache and Mongodb as
> our backend.
> So we would first do a query against redis cache, if no result can be
> found we would then query against Mongodb for data. Assuming redis and
> Mongodb components are working, what type of integration pattern can I use
> for this? And how would I implement it?
> Thanks, Gordon





-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/question-about-database-querying-design-pattern-tp5759159p5759172.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to