HHH-11516 : Level two cache may not be enabled when using @Cacheable without/instead of @Cache
This commit is contained in:
parent
640680fcbc
commit
12a1b3c225
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue