org.apache.http.impl.client.cache
Class CacheInvalidator
java.lang.Object
org.apache.http.impl.client.cache.CacheInvalidator
@ThreadSafe
public class CacheInvalidator
- extends Object
Given a particular HttpRequest, flush any cache entries that this request
would invalidate.
- Since:
- 4.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheInvalidator
public CacheInvalidator(URIExtractor uriExtractor,
HttpCache<CacheEntry> cache)
- Create a new
CacheInvalidator
for a given HttpCache
and
URIExtractor
.
- Parameters:
uriExtractor
- Provides identifiers for the keys to store cache entriescache
- the cache to store items away in
flushInvalidatedCacheEntries
public void flushInvalidatedCacheEntries(HttpHost host,
HttpRequest req)
- Remove cache entries from the cache that are no longer fresh or
have been invalidated in some way.
- Parameters:
host
- The backend host we are talking toreq
- The HttpRequest to that host
flushUriIfSameHost
protected void flushUriIfSameHost(URL requestURL,
URL targetURL)
throws HttpCacheOperationException
- Throws:
HttpCacheOperationException
flushRelativeUriFromSameHost
protected void flushRelativeUriFromSameHost(URL reqURL,
String relUri)
throws HttpCacheOperationException
- Throws:
HttpCacheOperationException
flushAbsoluteUriFromSameHost
protected boolean flushAbsoluteUriFromSameHost(URL reqURL,
String uri)
throws HttpCacheOperationException
- Throws:
HttpCacheOperationException
requestShouldNotBeCached
protected boolean requestShouldNotBeCached(HttpRequest req)
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.