Skip to content

Commit

Permalink
fix(light) Fixed could not find dynamic light cache problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
yizzuide committed Oct 22, 2020
1 parent c421e32 commit 90b7005
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Milkomeda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<properties>
<java.version>1.8</java.version>
<project.release.version>3.12.5-SNAPSHOT</project.release.version>
<project.release.version>3.12.6-SNAPSHOT</project.release.version>
<spring-boot.version>2.2.4</spring-boot.version>
<spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
<mybatis.starter.version>2.1.1</mybatis.starter.version>
Expand Down Expand Up @@ -67,7 +67,7 @@
<profile>
<id>sonatype-oss-release</id>
<properties>
<project.release.version>3.12.5</project.release.version>
<project.release.version>3.12.6</project.release.version>
</properties>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
* 超级缓存清理
*
* @author yizzuide
* @since 3.12.5
* @since 3.3.0
* @version 3.12.6
* Create at 2020/05/06 14:13
*/
public class LightCacheCleanAstrolabeHandler implements AstrolabeHandler {

@Override
public void postHandle(ServletRequest request, ServletResponse response) {
// 清除请求线程的所有Cache子实例的超级缓存
Map<String, Cache> cacheMap = ApplicationContextHolder.get().getBeansOfType(Cache.class);
Map<String, Cache> cacheMap = ApplicationContextHolder.get().getBeansOfType(Cache.class, false, false);
for (Cache cache : cacheMap.values()) {
if (cache instanceof LightCache && ((LightCache)cache).isEnableSuperCache()) {
CacheHelper.remove(cache);
Expand Down
2 changes: 1 addition & 1 deletion MilkomedaDemo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
<milkomeda.version>3.12.5-SNAPSHOT</milkomeda.version>
<milkomeda.version>3.12.6-SNAPSHOT</milkomeda.version>
<mybatis.starter>2.1.1</mybatis.starter>
<redission.version>3.12.5</redission.version>
<zookeeper.version>3.4.14</zookeeper.version>
Expand Down

0 comments on commit 90b7005

Please sign in to comment.