org.apache.shindig.gadgets.http
Class DefaultHttpCache

java.lang.Object
  extended by org.apache.shindig.gadgets.http.AbstractHttpCache
      extended by org.apache.shindig.gadgets.http.DefaultHttpCache
All Implemented Interfaces:
HttpCache

public class DefaultHttpCache
extends AbstractHttpCache

Simple cache of HttpResponses. It is recommended that this cache be configured with a shared cache rather than a memory only cache.


Field Summary
static String CACHE_NAME
           
 
Constructor Summary
DefaultHttpCache(CacheProvider cacheProvider)
           
 
Method Summary
protected  void addResponseImpl(String key, HttpResponse response)
           
protected  HttpResponse getResponseImpl(String key)
           
protected  HttpResponse removeResponseImpl(String key)
           
 
Methods inherited from class org.apache.shindig.gadgets.http.AbstractHttpCache
addResponse, createKey, getAppUrl, getInstanceId, getOwnerId, getResponse, getServiceName, getTokenName, getTokenOwner, getViewerId, isCacheable, isCacheable, removeResponse, responseStillUsable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_NAME

public static final String CACHE_NAME
See Also:
Constant Field Values
Constructor Detail

DefaultHttpCache

@Inject
public DefaultHttpCache(CacheProvider cacheProvider)
Method Detail

getResponseImpl

protected HttpResponse getResponseImpl(String key)
Specified by:
getResponseImpl in class AbstractHttpCache

addResponseImpl

protected void addResponseImpl(String key,
                               HttpResponse response)
Specified by:
addResponseImpl in class AbstractHttpCache

removeResponseImpl

protected HttpResponse removeResponseImpl(String key)
Specified by:
removeResponseImpl in class AbstractHttpCache


Copyright © 2007-2012. All Rights Reserved.