Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333820 - [discovery] Cache jars downloaded by RemoteBundleDiscoveryStrategy
Summary: [discovery] Cache jars downloaded by RemoteBundleDiscoveryStrategy
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 334707
  Show dependency tree
 
Reported: 2011-01-09 22:50 EST by Pascal Rapicault CLA
Modified: 2011-01-18 16:10 EST (History)
0 users

See Also:


Attachments
Potential patch (21.08 KB, patch)
2011-01-12 14:17 EST, Matthew Piggott CLA
no flags Details | Diff
Updated fix (20.65 KB, patch)
2011-01-18 11:12 EST, Matthew Piggott CLA
pascal: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2011-01-09 22:50:32 EST
The RemoteBundleDiscoveryStrategy should cache the jars being downloaded.  There is logic in p2 (not sure it is reusable as such) that can be used.
Comment 1 Matthew Piggott CLA 2011-01-12 14:17:26 EST
Created attachment 186662 [details]
Potential patch

The attached patch contains a port of the CacheManager used to cache repositories.

One potential problem, if the catalogs change their URLs overtime we could have a buildup of files in the cache.  (CacheManager for repositories listens to the event bus for remove events to remove cached data.)
Comment 2 Matthew Piggott CLA 2011-01-18 11:12:24 EST
Created attachment 187013 [details]
Updated fix

Made a few changes to ensure streams were closed.
Comment 3 Pascal Rapicault CLA 2011-01-18 15:27:22 EST
I have released a slightly corrected version of that patch.