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