You want to generate an application via JHipster, but you require to understand what caching types are available to use?
Sample jdl with cache provider type definition
application {
config {
...
clientFramework angular
cacheProvider ehcache
databaseType sql
...
}
}
You can find all current supported caching provider types in github in the typescript file cache-types.ts
Available cache provider types
Depending of what type of UI framework you require, you have full support in JHipster for following frameworks. As of Q1 2023 we are having:
- no
use no caching at all - caffeine
a pure Java implementation and a pure memory based single node cache with a very cache hit ratio handling - ehcache
also a pure Java implementation known to be a bit slower as caffeine, but provides caches with very common LRU, LFU, FIFO eviction. Also usually used for Hibernate persistency framework to speed up database accesses - hazelcast
a pure Java implementation with options to configure perfectly as distributed cache in clustered environments. Provides locking mechanisms for concurrent updates of the cases. If you require distributed caches over multiple cluster nodes, it is recommended to consider this cache implementation. The initial configuration is a bit more complex, but you can easily map to a data center environment. - infinispan
a pure Java implementation and considered to be the fastest distributed caching implementation. Even faster as hazelcast. - memcached
it runs as a separate process outside your java application and requires a remote call from you java application to memcached. Installation is quickly done and can be easily used in clustered environments. - redis
As memcached, it is a separate process and commonly used in PHP environments. Installation is quickly done of a redis server e.g. with a docker container. Therefore it can be easily used in clustered environments. But it is typically not recommended to use redis in combination with Java applications, if not clearly optimized for redis object storage.
Redis is considered to be the slowest solution in Java environments.
Related articles
Available JHipster database types for JDL
Available JHipster build tool types for JDL
Available JHipster authentication types for JDL
Available JHipster application types for JDL
Available JHipster client framework types for JDL