package org.jboss.resteasy.client.jaxrs.cache;
import javax.ws.rs.core.Feature;
import javax.ws.rs.core.FeatureContext;
public class BrowserCacheFeature implements Feature
{
protected BrowserCache cache;
public BrowserCache getCache()
{
return cache;
}
public void setCache(BrowserCache cache)
{
this.cache = cache;
}
@Override
public boolean configure(FeatureContext configuration)
{
if (cache == null) cache = new LightweightBrowserCache();
configuration.property(BrowserCache.class.getName(), cache);
configuration.register(new CacheInterceptor(cache));
return true;
}
}