If you choose Hibernate as your JPA provider you can activate entity 2nd
level caching [1] with Infinispan [2]. Or use Infinispan as a general
purpose (not only for JPA entities) Distributed cache. In the latter case,
there is a Camel component to interact with Infinispan caches [3].

[1]
https://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html#caching
[2] http://infinispan.org
[3] http://camel.apache.org/infinispan.html

________________________
Rafael Torres Coelho Soares

On Sat, Oct 7, 2017 at 7:58 AM, Imran Raza Khan <imranrazak...@gmail.com>
wrote:

> I have currently project to which i planning to migrate to Apache camel.
>
> It exposes API to inquire for different Inventory stored in DB.
> These Inventory model doesn't change frequently and new Inventory got
> update once in two months.
> Currently at start of Application i load all entities(Inventory,
> SystemConfig, and couple of related entities ) from DB and stored in
> HashMap's of my developed CacheManager class.
> For any new changes we restart the application.
>
> Now looking for some more better options in ApacheCamel
>
> Should I cache the data or hit the database?
> Use Cache providers like Redis, EhCache, Hazelcast or custom cache.
> But should not overkill too or keeping future growth in mind i should
> try some third party provider so in future i would not require to re
> design from scratch if go for clustering. Currently its deployed on
> two individual servers with hardware load balance on front.
>

Reply via email to