File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
spring-context-support/src/main/java/org/springframework/cache Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2013 the original author or authors.
2
+ * Copyright 2002-2014 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -89,12 +89,11 @@ protected Collection<Cache> loadCaches() {
89
89
public Cache getCache (String name ) {
90
90
Cache cache = super .getCache (name );
91
91
if (cache == null ) {
92
- // check the EhCache cache again
93
- // (in case the cache was added at runtime)
92
+ // Check the EhCache cache again (in case the cache was added at runtime)
94
93
Ehcache ehcache = getCacheManager ().getEhcache (name );
95
94
if (ehcache != null ) {
96
- cache = new EhCacheCache (ehcache );
97
- addCache ( cache );
95
+ addCache ( new EhCacheCache (ehcache ) );
96
+ cache = super . getCache ( name ); // potentially decorated
98
97
}
99
98
}
100
99
return cache ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2013 the original author or authors.
2
+ * Copyright 2002-2014 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -114,8 +114,8 @@ public Cache getCache(String name) {
114
114
// Check the JCache cache again (in case the cache was added at runtime)
115
115
javax .cache .Cache <Object , Object > jcache = getCacheManager ().getCache (name );
116
116
if (jcache != null ) {
117
- cache = new JCacheCache (jcache , isAllowNullValues ());
118
- addCache ( cache );
117
+ addCache ( new JCacheCache (jcache , isAllowNullValues () ));
118
+ cache = super . getCache ( name ); // potentially decorated
119
119
}
120
120
}
121
121
return cache ;
You can’t perform that action at this time.
0 commit comments