Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333820

Summary: [discovery] Cache jars downloaded by RemoteBundleDiscoveryStrategy
Product: [Eclipse Project] Equinox Reporter: Pascal Rapicault <pascal>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.7   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 334707    
Attachments:
Description Flags
Potential patch
none
Updated fix pascal: iplog+

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.