Package org.vosao.global

Examples of org.vosao.global.PageCacheItem


      }
    }

  private boolean servedFromCache(String url,  HttpServletResponse response)
      throws IOException {
    PageCacheItem page = getSystemService().getPageCache().get(url,
        getBusiness().getLanguage());
    if (page != null) {
        response.setContentType(page.getContentType());
        response.setCharacterEncoding("UTF-8");
        Writer out = response.getWriter();
        out.write(page.getContent());
      return true;
    }
    return false;
  }
View Full Code Here


  }
 
  @Override
  public PageCacheItem get(String url, String language) {
    try {
      PageCacheItem item = (PageCacheItem)getCache().get(getPageKey(url,
          language));
      if (item != null) {
        if (getCache().getResetDate() == null
            || item.getTimestamp().after(getCache()
                .getResetDate())) {
          return item;
        }
      }
    }
View Full Code Here

  @Override
  public void put(String url, String language, String content,
      String contentType) {
    getCache().put(getPageKey(url, language),
        new PageCacheItem(content, contentType));
  }
View Full Code Here

TOP

Related Classes of org.vosao.global.PageCacheItem

Copyright © 2018 www.massapicom. 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.