public boolean isExpired(RepositoryProxyCache proxyCache){
  long methodCacheTime=proxyCache.getCacheTime();
  boolean unlimitedCache=methodCacheTime <= 0;
  File cacheFile=buildFile(proxyCache.getCacheDir(),proxyCache.getFileName(),DEFAULT_FILE_NAME);
  if (isCached(cacheFile)) {
    if (unlimitedCache) {
      return false;
    }
    long lastModifiedTime=fileManager.getLastModifiedTime(cacheFile);
    boolean expired=System.currentTimeMillis() > (lastModifiedTime + methodCacheTime);
    if (expired) {
      evict(proxyCache);
    }
    return expired;
  }
  return true;
}

public boolean isExpired ( RepositoryProxyCache proxyCache ) { long methodCacheTime = proxyCache . getCacheTime ( ) ; boolean unlimitedCache = methodCacheTime <= 0 ; File cacheFile = buildFile ( proxyCache . getCacheDir ( ) , proxyCache . getFileName ( ) , DEFAULT_FILE_NAME ) ; if ( isCached ( cacheFile ) ) { if ( unlimitedCache ) { return false ; } long lastModifiedTime = fileManager . getLastModifiedTime ( cacheFile ) ; boolean expired = System . currentTimeMillis ( ) > ( lastModifiedTime + methodCacheTime ) ; if ( expired ) { evict ( proxyCache ) ; } return expired ; } return true ; }
warning : this is an i / o operation and this method must to be performed in a different thread .
