HHH-11516 : Level two cache may not be enabled when using @Cacheable without/instead of @Cache

This commit is contained in:
Gail Badner 2017-03-12 23:53:38 -07:00 committed by Gail Badner
parent 640680fcbc
commit 12a1b3c225
1 changed files with 3 additions and 8 deletions

View File

@ -1156,16 +1156,11 @@ public final class AnnotationBinder {
return new LocalCacheAnnotationImpl( region, determineCacheConcurrencyStrategy( context ) );
}
private static CacheConcurrencyStrategy DEFAULT_CACHE_CONCURRENCY_STRATEGY;
private static CacheConcurrencyStrategy determineCacheConcurrencyStrategy(MetadataBuildingContext context) {
if ( DEFAULT_CACHE_CONCURRENCY_STRATEGY == null ) {
DEFAULT_CACHE_CONCURRENCY_STRATEGY = CacheConcurrencyStrategy.fromAccessType(
return CacheConcurrencyStrategy.fromAccessType(
context.getBuildingOptions().getImplicitCacheAccessType()
);
}
return DEFAULT_CACHE_CONCURRENCY_STRATEGY;
}
@SuppressWarnings({ "ClassExplicitlyAnnotation" })
private static class LocalCacheAnnotationImpl implements Cache {