Caching

Caching is a good practice in software development, and it improves the performance of read operations considerably. Caching can be enabled for Hibernate second level cache, and also with Spring Cache abstraction, to enable caching at the method level.

Spring Cache abstraction (https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#cache) lets us easily add caching at different layers of the application. For example, with this, we can enable caching of a pure function (which doesn't involve any side effects) so that for the same set of inputs, the outputs are produced from the cache instead of executing the method.

JHipster supports JCache-compatible Hibernate second level cache provided by Ehcache, Hazelcast, Redis, and Infinispan.

We'll take a look at Ehcache, Hazelcast, Infinispan, Memcached, and Redis in the next sections.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.124.244