net/src/main/java/com/stanfy/enroscar/net/cache/BaseFileResponseCache.java
protected CacheResponse get(final CacheEntry requestInfo) {
    if (!checkDiskCache()) { return null; }
    final CacheEntry entry = newCacheEntry();
    final DiskLruCache.Snapshot snapshot = readCacheInfo(requestInfo, entry);
    if (snapshot == null) { return null; }

    if (!entry.matches(requestInfo) || !entry.canBeUsed()) {
      snapshot.close();
      return null;
    }

    hitCount.incrementAndGet();

    final InputStream body = newBodyInputStream(snapshot);
    return entry.newCacheResponse(body);
  }
protected CacheResponse get(final CacheEntry requestInfo) {
    if (!checkDiskCache()) { return null; }
    final CacheEntry entry = newCacheEntry();
    final DiskLruCache.Snapshot snapshot = readCacheInfo(requestInfo, entry);
    if (snapshot == null) { return null; }

    if (!entry.matches(requestInfo) || !entry.canBeUsed()) {
      snapshot.close();
      return null;
    }

    hitCount.incrementAndGet();

    final InputStream body = newBodyInputStream(snapshot);
    return entry.newCacheResponse(body);
  }
protected CacheResponse get ( final CacheEntry requestInfo ) { if ( ! checkDiskCache ( ) ) { return null ; } final CacheEntry entry = newCacheEntry ( ) ; final DiskLruCache . Snapshot snapshot = readCacheInfo ( requestInfo , entry ) ; if ( snapshot == null ) { return null ; } if ( ! entry . matches ( requestInfo ) || ! entry . canBeUsed ( ) ) { snapshot . close ( ) ; return null ; } hitCount . incrementAndGet ( ) ; final InputStream body = newBodyInputStream ( snapshot ) ; return entry . newCacheResponse ( body ) ; }
Read cache for the specified cache entry.
@param requestInfo request info (cache key)
@return cache response instance
Read cache for the specified cache entry .