Examples of generatePageKey()


Examples of com.skyline.energy.definition.CacheDefinition.generatePageKey()

    Cache cache = cacheResult.getCache();

    if (cacheDefinition.isReturnCollection()) {
      Page page = CommonUtils.getPageArgument(args, cacheDefinition.getPageIndex());
      if (page != null) { // 判断分页参数是非被复用
        String pageKey = cacheDefinition.generatePageKey(args, key);
        LOGGER.debug("缓存为需要分页的缓存,页码(" + page.getCurpage() + "),对应的分页缓存KEY为:" + pageKey);
        Page cachePage = (Page) cache.get(pageKey);
        page.setTotal(cachePage.getTotal());
        cacheResult.setPageKey(pageKey);
      }
View Full Code Here

Examples of com.skyline.energy.definition.CacheDefinition.generatePageKey()

      int pageIndex = cacheDefinition.getPageIndex();
      Page page = CommonUtils.getPageArgument(args, pageIndex);
      if (page != null) {
        String pageKey = cacheResult.getPageKey();
        if (pageKey == null) {
          pageKey = cacheDefinition.generatePageKey(args, key);
        }
        if (!StringUtils.isEmpty(pageKey)) {
          cache.add(pageKey, page, expire);
          LOGGER.debug("缓存为需要分页的缓存,页码(" + page.getCurpage() + "),缓存分页对象到:" + pageKey + ", 缓存时间:" + expire + "毫秒");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.