At cache.put(...) 4 events are created e.g.
{code}
EventImpl{pre=true, key=CacheKey{name='foobar', lastModified=1327662339099, attributes=[]}, transaction=DldGlobalTransaction{coinToss=6282419818130005544, isMarkedForRollback=false, lockIntention=null, affectedKeys=[], locksAtOrigin=[]} GlobalTransaction:<null>:1:local, originLocal=true, transactionSuccessful=false, type=CACHE_ENTRY_CREATED, value=null}
EventImpl{pre=false, key=CacheKey{name='foobar', lastModified=1327662339099, attributes=[]}, transaction=DldGlobalTransaction{coinToss=6282419818130005544, isMarkedForRollback=false, lockIntention=null, affectedKeys=[], locksAtOrigin=[]} GlobalTransaction:<null>:1:local, originLocal=true, transactionSuccessful=false, type=CACHE_ENTRY_CREATED, value=null}
EventImpl{pre=true, key=CacheKey{name='foobar', lastModified=1327662339099, attributes=[]}, transaction=DldGlobalTransaction{coinToss=6282419818130005544, isMarkedForRollback=false, lockIntention=null, affectedKeys=[], locksAtOrigin=[]} GlobalTransaction:<null>:1:local, originLocal=true, transactionSuccessful=false, type=CACHE_ENTRY_MODIFIED, value=null}
EventImpl{pre=false, key=CacheKey{name='foobar', lastModified=1327662339099, attributes=[]}, transaction=DldGlobalTransaction{coinToss=6282419818130005544, isMarkedForRollback=false, lockIntention=null, affectedKeys=[], locksAtOrigin=[]} GlobalTransaction:<null>:1:local, originLocal=true, transactionSuccessful=false, type=CACHE_ENTRY_MODIFIED, value=xyz}
{code}
Why not just only 2 events are thrown? (pre-create and create)
Yes taht true. I also have seen that. This is only when a new object is put into teh cache.
But when the object is modified i think it should be two events. (not sure though)