Caching Resources Loaded by Java Applet
===

How can I control what does and doesn't get cached *by* an applet. Additionally, any insights into how caching works within an applet would be most appreciated.

I'm making a simple request in an applet to try and test if resources loaded at runtime are cached anywhere.

Here's the code that makes the request. I call this several times in a row, all within the same applet lifecycle:

    URL url = new URL("http", "localhost", 8343, "/spring-social-test/testSession.html");
    			URLConnection connection = url.openConnection();
    			connection.setDefaultUseCaches(true);
    			connection.connect();

But here's what is output in the Java applet plugin console:

    network: Cache entry not found [url: http://localhost:8343/spring-social-test/index.html, version: null]
    network: Connecting http://localhost:8343/spring-social-test/index.html with proxy=DIRECT