Package com.anthavio.httl.cache

Examples of com.anthavio.httl.cache.CachedResponse


    if (softTtl <= 0 && Cutils.isEmpty(etag) && lastModified <= 0) {
      return null;
    }
    long hardTtl = softTtl > 0 ? softTtl : 10; //XXX default hardTtl is 10 seconds - should be parametrized

    CachedResponse cachedResponse = new CachedResponse(request, response);
    return new CacheEntry<CachedResponse>(cachedResponse, hardTtl, softTtl);

  }
View Full Code Here


      @Override
      public SenderResponse call() throws Exception {
        SenderResponse response = execute(request);
        //too dangerous to left the SenderResponse unclosed
        //we will cache the response...
        return new CachedResponse(request, response);
      }
    });
  }
View Full Code Here

TOP

Related Classes of com.anthavio.httl.cache.CachedResponse

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.