On 23 Sep 07, at 8:28 PM 23 Sep 07, Carlos Sanchez wrote:
Hi, this is a thread to gather other people's opinions on the usage of
caching inside core maven
While using the embedder I've come across some caching issues, mainly
MNG-3008, but also MNG-3170 and MNG-3013
For instance in org.apache.maven.project.build.ProjectBuildCache
projects are being cached but never removed (please correct me if this
assumption is wrong), so we would need some features like
- maximum size of the cache
- eviction policy (FIFO)
- programatically evict projects (eg. when the pom file changes)
...
It was only intended for the session and should be flushed after the
session. We tried to remove all optimization so that we could focus
on correctness and tackle the refactoring of the project builder. If
it's not flushed at the end of the reactor run then that's all that
needs to be done.
These requirements mean to me that a "real" cache would need to be
used instead of HashMaps, something like ehcache or Apache JCS that
already have all that implemented.
-1
That's way too much overkill, especially for the core in a CLI run. I
mean really what are the rules?
1) If it's a release it shouldn't change and you can hold on to it
the entire life of the embedder.
2) If it's a snapshot hold on to it during the session and then flush
it so that you get a new one the next session. If you wanted to get
fancy and check timestamps, or md5s for snapshots without the local
reactor you probably could here, but the simple rule of tossing post-
session would probably work just fine.
How much more complicated is it then that?
We already discussed this when Joakim attempted this and it's just so
much overkill.
What do other people think?
--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]