Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-17148

Improvements needed (regarding caching) in the URLTransport* API

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.Beta2
    • 4.2.0.Beta1
    • common
    • 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

            rob.stryker Rob Stryker (Inactive)
            fbricon@redhat.com Fred Bricon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: