For "vfs" based urls to be able to work efficiently in things like
URLClassLoaders, I need to cache VFSs and the children of VirtualFiles. If you don't
do this, then jar files are continuously being reprocessed and things grind to a hault.
The protocol Handler for vfs based URLs returns a VirtualFileURLConnection. If the
setUseCaches is true, it caches the base VFS of the URL you are looking up. If not, the
cache is not used and a new VFS is done.
VirtualFile.getChildren, findChildren, etc... FileHandler keeps a cache of children.
Whenver find/get is called, the FileHandler looks in its cache but will also make sure
that the file has not changed on disk since it was cached. If it has, it will remove that
item from the cache and create a new handler.
This requires me to cache the timestamp of the file when the virtualfilehandler is created
so that it can be compared with the latest timestamp of the file.
If we dont' do this timestamp comparison, then the cache will have old items when
things are redeployed.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992345#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...