Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » URIResolverExtension and caching
URIResolverExtension and caching [message #116346] Tue, 05 July 2005 14:02 Go to next message
Axel Hecht is currently offline Axel HechtFriend
Messages: 16
Registered: July 2009
Junior Member

I'm not sure whether this is my weak java foo or if this is actually an
eclipse wtp question. I implement a
org.eclipse.wst.common.uriresolver.internal.provisional.URIR esolverExtension
in my plugin, and I would like to cache some of the computed values.

The values are project specific, so I had some hash for (project, uri)
-> uri. Now my real question is, how do I do that with a sane balance of
performance and memory bloat/leak.

I was thinking about some kind of shared instance like plugin classes
have, but I'm a bit worried how those get teared down again. And is
there a good way to know which hash entries to prune and when?

Yeah, fuzzy description, but it sounds like something that others did a
dozens of times, thus I ask


Re: URIResolverExtension and caching [message #116455 is a reply to message #116346] Tue, 05 July 2005 20:29 Go to previous message
Lawrence Mandel is currently offline Lawrence MandelFriend
Messages: 486
Registered: July 2009
Senior Member
Hi Axel,

The org.eclipse.wst.internet.cache URI resolver does something similar.
You can implement your cache as a singleton (see and associate an
expiration time with each entry. In that way you have one instance of your
cache and you can prune dead entires. You can also have your plugin clear
all the entries when your plugin is deactivated or store them for use the
next time Eclipse is run.

Previous Topic:When is the flexible project getting a UI for existing projects?
Next Topic:Question on Top down web service creation
Goto Forum:

Current Time: Tue Apr 24 07:16:39 GMT 2018

Powered by FUDForum. Page generated in 0.02651 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software