Does it get cached forever or only until you stop your browser? The reason I am asking is I was wondering what you would have to do to release an updated applet. I have written ActiveX controls in the past and IE allows you to specify a version # and it will download a new control if the version # is higher than the version cached locally.
It is cached *at least* until you shut down the browser or force reloading (Ctrl+F5 in IE, shift+reload in NN). Some files may be kept even longer.
I don't think there's any simple way to achieve what you are hoping to do -- there is no version number system in java applets. Because of the sandbox model applets should have *very* little access to the local file system so even caching the class files is a little suspicious.
Java web start might be an answer, if you really want one...
A simple way of achieving what you want is to specify the version number in the filename of the JAR that your Applet is distributed in:
myapplet10.jar
myapplet11.jar
You'll have to update the HTML page that delivers the Applets but that should at least beat the browser's caching policy. Just a thought.
Applet jars are cached according to how long you set their lifetime. There are tags you can set so that the browser will check for updated jars each time. I cannot remember the exact format of the Applet or Object html tag but I am sure you can do this bit of research.
The 'state' of the applet is not cached as this is what your question appears to ask. you will have to use sessions to store state.