| A reason why I didn't proceed forward is that I realized that Hibernate's integration expects the cache to provide its own configuration file. This leads into the classic framework vs. library debate. Caffeine takes a library design by providing integration hooks, but is not overly opinionated or act like a subsystem. Instead of a file format, a specification parser is provided to simplify working in the application's configuration format (e.g. Spring's properties, Dropwizard's yaml, Play's hcon). JCache (JEE) is meant to adapt to a framework design, so the provider does specify a configuration file. It seems that JCache would be the easiest way to integrate into Hibernate and avoids the pain of supporting N cache implementations. It looks like the Ehcache 3.0 team has started to work on JCache support, so that may be the best path forward. |