|
Java™ by example!
|
|
|
How do I use the classes CacheRequest and CacheResponse?
JDK 1.5 provides a framework into which an caching implementation can be plugged. A standard protocol handler can use the ResponseCache class to get documents from the cache. For example, if the flag useCaches is set on a URLConnection (true by default), an attempt is made to fetch the content from the cache, implementation specified by ResponseCache. Here's an example with implementations of ResponseCache, CacheResponse and CacheRequest: Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|