Package org.apache.abdera.protocol.client.cache

Examples of org.apache.abdera.protocol.client.cache.CacheDisposition


    RequestEntity entity,
    RequestOptions options) {
      try {
        if (options == null) options = getDefaultRequestOptions();
        Cache cache = getCache();
        CacheDisposition disp =
          (useCache(method,options)) ?
            cache.getDisposition(uri, options) :
            CacheDisposition.TRANSPARENT;
        CachedResponse cached_response = cache.get(uri, options);
        disp = (!disp.equals(CacheDisposition.TRANSPARENT) &&
                mustRevalidate(options, cached_response)) ?
                  CacheDisposition.STALE :
                  disp;
        switch(disp) {
          case FRESH:                                                            // CACHE HIT: FRESH
View Full Code Here


  private CacheDisposition getCacheDisposition(
    boolean usecache,
    String uri,
    RequestOptions options,
    CachedResponse cached_response) {
    CacheDisposition disp =
      (usecache) ?
        cache.getDisposition(uri, options) :
        CacheDisposition.TRANSPARENT;
    disp = (!disp.equals(CacheDisposition.TRANSPARENT) &&
            mustRevalidate(options, cached_response)) ?
              CacheDisposition.STALE :
              disp;
    return disp;
  }
View Full Code Here

      boolean usecache = useCache(method,options);
      options = options != null ? options : getDefaultRequestOptions();
      try {
        Cache cache = getCache();
        CachedResponse cached_response = cache.get(uri, options);
        CacheDisposition disp = getCacheDisposition(
          usecache, uri, options, cached_response);
        switch(disp) {
          case FRESH:                                                            // CACHE HIT: FRESH
            if (cached_response != null) {
              checkRequestException(cached_response,options);
View Full Code Here

TOP

Related Classes of org.apache.abdera.protocol.client.cache.CacheDisposition

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.