EHC ❯ Cache listener.notifyElementRemoved called on removeQuiet()
-
Bug
-
Status: Closed
-
-
Resolution: Fixed
-
-
-
drb
-
Reporter: sourceforgetracker
-
September 21, 2009
-
0
-
Watchers: 0
-
September 22, 2009
-
September 22, 2009
Description
According to the javadocs cache.removeQuiet() should “Remove an Element from the Cache, without notifying listeners”.
It seems that listeners are anyway notified also when this method is used (notifyElementRemoved is called). The last check in Cache.remove() always calls listeners without considering the notifyListeners parameters:
===== //If we are trying to remove an element which does not exist locally, we should still notify so that //cluster invalidations work. if (!expiry && !removeNotified) { Element syntheticElement = new Element(key, null); registeredEventListeners.notifyElementRemoved(syntheticElement, doNotNotifyCacheReplicators); } =====
(net.sf.ehcache.Cache.java line 1401 - ehcache 1.6-b3)
should probably be:
if (notifyListeners && !expiry && !removeNotified) {
Sourceforge Ticket ID: 2725134 - Opened By: fgiust - 1 Apr 2009 14:06 UTC
Comments
Sourceforge Tracker 2009-09-21
Fiona OShea 2009-09-22
Re-opening so that I can properly close out these issues and have correct Resolution status in Jira
Agree.
Done in trunk and will be in ehcache-1.6-beta4. Comment by: gregluck - 3 Apr 2009 09:05 UTC