I think this is the RegionFactory's responsibility, as Hibernate ORM
alone can't know if this is necessary.
Prefixing is one of many options to isolate caches; a Cache technology
might wish to use a different approach by implementing a custom
Not least the server / deployer might be able to hint the Cache
provider to tell if isolation is at all necessary.
In conclusion, by having Hibernate ORM not messing with prefixes
allows other technologies to implement more efficient solutions. Our
own code also ends up being more efficient by not needing to add a
prefix during each and every access to the cache.
On 17 May 2018 at 06:34, Gail Badner <gbadner(a)redhat.com> wrote:
I see that cache region names are not being prefixed in 5.3.
EnabledCaching sets the TimestampsRegion region name
to TimestampsRegion.class.getName(), and sets the QueryResultsRegion region
name to QueryResultsRegion.class.getName(). 
Without a prefix, WildFly is failing intermittently when there are 2
persistence units with the query cache enabled due to:
org.infinispan.commons.CacheConfigurationException: ISPN000453: Attempt to
define configuration for cache org.hibernate.cache.spi.TimestampsRegion
which already exists
Entity region names are not being prefixed either.
Should they be prefixed by Hibernate or by the RegionFactory?
hibernate-dev mailing list