I am really puzzled why there is a method to remove an object from the
2nd level cache - SessionFactory.Evict(object) but there is no
function to put an object directly into the 2nd level cache, e.g. a
SessionFactory.Add(object).

Background:  I receive Entities from a P2P network connection that, by
definition, are supposed to be the most up-to-date objects.  These
should be taken as the new master copy of the entity.  So, they should
replace any object in the 2nd level cache which has the same key.  I
currently am able to take the old object out of the 2nd level cache by
using SessionFactory.Evict(object) but I have no API to get the object
in.

It's really baffling to me why NHib would implement the functionality
to take an object out of 2nd level cache but not bother to implement a
way to put an object in!?

I do not want to make a round trip to the database to select the
updated object again.  The P2P connection has supplied the new object
and our rules say that the network-received object is the master, no
ifs, ands, or buts.

Thanks for your help.
Hugh

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to