Skip to content

Commit

Permalink
HHH-11516 : Level two cache may not be enabled when using @Cacheable
Browse files Browse the repository at this point in the history
…without/instead of @Cache

(cherry picked from commit 7c870ac)
  • Loading branch information
Gail Badner authored and gbadner committed Mar 13, 2017
1 parent f1abc98 commit 3b75488
Showing 1 changed file with 3 additions and 8 deletions.
Expand Up @@ -1144,15 +1144,10 @@ private static Cache buildCacheMock(String region, MetadataBuildingContext conte
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(
context.getBuildingOptions().getImplicitCacheAccessType()
);
}
return DEFAULT_CACHE_CONCURRENCY_STRATEGY;
return CacheConcurrencyStrategy.fromAccessType(
context.getBuildingOptions().getImplicitCacheAccessType()
);
}

@SuppressWarnings({ "ClassExplicitlyAnnotation" })
Expand Down

0 comments on commit 3b75488

Please sign in to comment.