[hibernate-dev] Cache testing & JCache

Steve Ebersole steve at hibernate.org
Mon Mar 19 19:06:25 EDT 2018


The initial hibernate-jcache code would create JCache Cache instance "on
the fly" as they were needed if not already defined.  As part of a
discussion about JCache support, it was agreed that this should not happen.

To be clear... the integration code
calls javax.cache.CacheManager#getCache(java.lang.String).  If we are
returned nothing, its a choice between throwing an exception or
calling javax.cache.CacheManager#createCache.  The consensus among the
cache providers was that an exception should be thrown as the standard
outcome.

However, in testing I wonder if we want to allow that "on the fly" creation
to happen.  Opinions?  And if not, thoughts on how to best pre-define all
the needed Cache instances?


More information about the hibernate-dev mailing list