![]() |
![]() |
|
[
Permalink
| « Hide
]
Andy Jefferson added a comment - 22/Sep/10 09:24 AM
And that method doesn't exist in earlier versions of EHCache, hence would restrict access for the ehcache plugin to specific versions
so, it shouldn't call removeAll() at all then! :)
It's really a HUGE issue here. To wipe our your whole cluster's L2 cache across all machines, when you're just restarting a single node. plus, aren't all your plugins versioned? We're just saying that the latest version of the datanucleus-cache requires the latest version of ehcache, to fix a huge performance issue. That's an ok statement to make. Of course "clear" should remove all objects; that's what it is for. The user calls clear and it removes them.
If instead you are referring to *having an option* of not clearing the data from the external caching product when the L2 cache itself is closed then fine .... but that is not what you wrote above. The L2 cache is closed when the PMF (or EMF) is closed and the L2 cache is only designed for one PMF (or EMF) actually. For this option you could easily contribute a patch defining a persistence property and making use of it in the constructor of the EHCache plugin class (in the same way as other persistence properties are made use of). ah. ok. I'll take that compromise. :)
As the PMF is being shutdown, it should not proactively clear/evictAll from the cache. (or at least make it configurable). Ok, I'll try to suggest a patch for this, unless you have something in mind. (I assume it should be just commenting out one line of code). "datanucleus.cache.level2.clearAtClose" allows a user to override specification JDO/JPA behaviour of removing objects from L2 cache at close
|
||||||||||||||||||||||||||||||||||