-
Feature Request
-
Resolution: Done
-
Major
-
4.2.0.Beta1
-
None
There are a few things I'd like to see improved in the URL Transport API, wrt caching.
Currently :
- all files are downloaded and cached under <workspace>/.metadata/.plugins/org.jboss.tools.foundation.core/ECF_REMOTE_CACHE, using a cryptic name
- Cache doesn't survive JVM restart
What I need/expect :
- ability to set custom cache folder
- store files under <cache.folder>/requested.url. eg. : if I request https://foo.bar.org:8080/some/location/file.txt, it'll be stored under <workspace>/.metadata/.plugins/my.plugin/cache/http_foo.bar.org_8080/some/location/file.txt
- restarting the IDE will be able to read the cached file
Currently URLTransportCache is a singleton. We could change that and add the cache location as a constructor argument, have a URLTransportCache.DEFAULT instance, used by URLTransportUtility and probably override
public File getCachedFileForURL(String url, String displayName, int lifespan, IProgressMonitor monitor)
with
public File getCachedFileForURL(String url, String displayName, URLTransportCache transportCache, IProgressMonitor monitor)
Or if you have any better idea, be my guest