I have a query similar to this that is using the query cache.
var items = Session.CreateSQLQuery("SELECT Description FROM Notification
WHERE Code = :Code")
.SetCacheable(true)
.SetParameter("Code", UserContext.OrganisationCode)
.SetResultTransformer(Transformers.AliasToBean(typeof(NotificationItemViewModel)
))
.List<NotificationItemViewModel>();
How can I invalidate this cache when an entity changes? For a normal
ICriteria/QueryOver/HQL I know it is done automatically, but what about for
a named query or SQL query?
PS: I did post this to StackOverflow but not getting much love
http://stackoverflow.com/questions/35534985/nhibernate-createsqlquery-cache-invalidation
Thanks
Craig
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.