Package org.vosao.global

Examples of org.vosao.global.FileCacheItem


        folder.getEntity().getId(), filename);
    if (file != null) {
      byte[] content = getDao().getFileDao().getFileContent(file);
      if (file.getSize() < CacheService.MEMCACHE_LIMIT) {
        getSystemService().getFileCache().put(request.getPathInfo(),
            new FileCacheItem(file, content,
                VosaoContext.getInstance().getUser() == null));
      }
      sendFile(file, content, request, response);
    }
    else {
View Full Code Here


  }
 
  private boolean servedFromPublicCache(final String path,
      HttpServletRequest request,  HttpServletResponse response)
      throws IOException {
    FileCacheItem item = getSystemService().getFileCache().get(path);
    if (item != null && item.isPublicCache()) {
      if (getCache().getResetDate() == null
          || item.getTimestamp().after(getCache().getResetDate())) {
        sendFile(item.getFile(), item.getContent(), request, response);
        return true;
      }
    }
    return false;
  }
View Full Code Here

  }
 
  private boolean servedFromCache(final String path,
      HttpServletRequest request,  HttpServletResponse response)
      throws IOException {
    FileCacheItem item = getSystemService().getFileCache().get(path);
    if (item != null) {
      if (getCache().getResetDate() == null
          || item.getTimestamp().after(getCache().getResetDate())) {
        sendFile(item.getFile(), item.getContent(), request, response);
        return true;
      }
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of org.vosao.global.FileCacheItem

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.