Java Reference
In-Depth Information
}
}
catch
(
RuntimeException
ex
)
{
continue
;
}
}
}
public
Date
getMaxAge
()
{
return
maxAge
;
}
public
Date
getSharedMaxAge
()
{
return
sMaxAge
;
}
public
boolean
mustRevalidate
()
{
return
mustRevalidate
;
}
public
boolean
proxyRevalidate
()
{
return
proxyRevalidate
;
}
public
boolean
noStore
()
{
return
noStore
;
}
public
boolean
noCache
()
{
return
noCache
;
}
public
boolean
publicCache
()
{
return
publicCache
;
}
public
boolean
privateCache
()
{
return
privateCache
;
}
}
A client can take advantage of this information:
• If a representation of the resource is available in the local cache, and its expiry date
has not arrived, just use it. Don't even bother talking to the server.
• If a representation of the resource is available in the local cache, but the expiry date
has arrived, check the server with
HEAD
to see if the resource has changed before
performing a full
GET
.