添加清理asn号缓存的方法
This commit is contained in:
@@ -48,6 +48,7 @@ public class AsnCacheUtils{
|
|||||||
return (Map<Long,ConfigGroupInfo>)element.getObjectValue();
|
return (Map<Long,ConfigGroupInfo>)element.getObjectValue();
|
||||||
}
|
}
|
||||||
public static void clearCache() {
|
public static void clearCache() {
|
||||||
|
logger.warn("clear cache!");
|
||||||
CacheUtils.getCacheManager().removeCache(ASN_NO_CACHE);
|
CacheUtils.getCacheManager().removeCache(ASN_NO_CACHE);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -147,4 +148,9 @@ public class AsnCacheUtils{
|
|||||||
}
|
}
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
public static String getCacheName() {
|
||||||
|
return ASN_NO_CACHE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|||||||
|
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.SysDataDictionaryName;
|
import com.nis.domain.SysDataDictionaryName;
|
||||||
|
import com.nis.util.AsnCacheUtils;
|
||||||
import com.nis.util.CacheUtils;
|
import com.nis.util.CacheUtils;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
@@ -104,8 +105,12 @@ public class DictController extends BaseController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = {"refreshCache"})
|
@RequestMapping(value = {"refreshCache"})
|
||||||
public String refreshCache(String cacheName){
|
public String refreshCache(String cacheName){
|
||||||
//删除字典缓存
|
if(cacheName.equals(AsnCacheUtils.getCacheName())) {
|
||||||
CacheUtils.remove(cacheName);
|
AsnCacheUtils.clearCache();
|
||||||
|
}else {
|
||||||
|
//删除字典缓存
|
||||||
|
CacheUtils.remove(cacheName);
|
||||||
|
}
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -329,6 +329,9 @@ background:#3d3d3d;
|
|||||||
<li>
|
<li>
|
||||||
<a href="javascript:refreshCache('functionRegionDict')">refresh function region</a>
|
<a href="javascript:refreshCache('functionRegionDict')">refresh function region</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="javascript:refreshCache('asnNoCache')">refresh ASN no</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|||||||
Reference in New Issue
Block a user