desktopitemcache.java

来自「cwbbs 云网论坛源码」· Java 代码 · 共 48 行

JAVA
48
字号
package cn.js.fan.module.cms.ui;import cn.js.fan.base.*;import cn.js.fan.cache.jcs.RMCache;import com.cloudwebsoft.framework.util.LogUtil;public class DesktopItemCache extends ObjectCache {    String posCachePrefix = "DesktopItemCache_";    public DesktopItemCache(DesktopItemDb di) {        super(di);    }    public void refreshPosition(String systemCode, String position) {        try {            RMCache.getInstance().remove(posCachePrefix + systemCode + "_" + position, group);        }        catch (Exception e) {            LogUtil.getLog(getClass()).error("refreshPosition:" + e.getMessage());        }    }    public DesktopItemDb getDesktopItemDb(String systemCode, String position) {        RMCache rc = RMCache.getInstance();        DesktopItemDb di = null;        try {            di = (DesktopItemDb)rc.getFromGroup(posCachePrefix + systemCode + "_" + position, group);        }        catch (Exception e) {            LogUtil.getLog(getClass()).error("getDesktopItemDb1:" + e.getMessage());        }        if (di==null) {            DesktopItemDb did = (DesktopItemDb)objectDb;            di = did.getDesktopItemDbByPositionRaw(systemCode, position);            if (di!=null) {                try {                    rc.putInGroup(posCachePrefix + systemCode + "_" + position, group, di);                }                catch (Exception e) {                    LogUtil.getLog(getClass()).error("getDesktopItemDb2:" + e.getMessage());                }            }        }        return di;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?