I have an issue with VFS. I developed a web application to paste a URL of a deploy package(zip file) into a textarea. You can view deploy scripts and at the end deploy the application. It runs on a tomcat on a small machine. The deploy packages are about 5-100 MB. My problem now is, that the temp directory grows over time. VFS doesnt seem to delete the files from the temp directory. I wrote a startup script for the tomcat, that cleans the vfs temp dir. But that isnt very nice at all.
Is there a way to remove them through VFS without closing the
FileSystemManager
?It seems the temp dir is a cache, but when a file changes it doesnt load it again from the intranet.
I used to set
((DefaultFileSystemManager) VFS.getManager()).setFilesCache(new NullFilesCache());
((DefaultFileSystemManager) VFS.getManager()).setCacheStrategy(CacheStrategy.ON_CALL);
but it seems VFS doesnt treat the temp dir as cache. Do I unterstand something wrong?
I solved the problem by modifying my core project to get a FileSystemManager through a factory and handle the FileSystemManager inside through my web project(session bound and manually destroy method). On destroy i just close a FileSystemManager and create a new one. This tidys up the temp dir.