org.w3c.www.protocol.http.cache
Class SimpleCacheValidator
java.lang.Object
|
+--org.w3c.www.protocol.http.cache.CacheValidator
|
+--org.w3c.www.protocol.http.cache.SimpleCacheValidator
- public class SimpleCacheValidator
- extends CacheValidator
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SimpleCacheValidator
public SimpleCacheValidator()
checkStaleness
public boolean checkStaleness(CachedResource cr)
- Check if the request is stale or not
- Overrides:
- checkStaleness in class CacheValidator
- Returns:
- a boolean, false if the resource is still valid
true it if needs a revalidation.
isValid
public boolean isValid(CachedResource cr,
Request request)
- Is the currently cached version usable to answer the given request ?
- Overrides:
- isValid in class CacheValidator
- Returns:
- A boolean, true if we are able to generate
a valid answer to this request by the
perform
method,
false otherwise (the resource needs to be refreshed).
updateExpirationInfo
public void updateExpirationInfo(CachedResource cr,
Request request,
Reply reply)
- Update the expiration information on a cached resource, even if it was
not used. Note that it is the right place to update also information
for other cache behaviour used by the sweeper.
- Overrides:
- updateExpirationInfo in class CacheValidator
- Parameters:
cr,
- the CachedResource we are upgrading.request,
- the Requestreply,
- the Reply
revalidateResource
public void revalidateResource(CachedResource cr,
Request request,
Reply reply)
- reset all the ages after a revalidation
- Overrides:
- revalidateResource in class CacheValidator
- Parameters:
cr,
- the CachedResource we are upgrading.request,
- the Requestreply,
- the Reply