Does anyone have any thoughts on this? Is it not possible to do this? Thanks, Kent
On Mar 2, 12:33 pm, Kent Boogaart <[email protected]> wrote: > If I have configured NH to use a second level cache, is it possible to > get a hold of a reference to the ICacheProvider or ICache in question? > > I would like to use the same cache for non-DB data, preferably without > taking a dependency on any one particular caching implementation. > Thus, it would be nice if I could do something like this: > > public void SomeMethod() > { > ICache cache = sessionFactory.GetCache(); > var cachedValue = cache.GetValue("someKey"); > > if (cachedValue == null) > { > // calculate value and cache it > } > > // do something with calculated value > > } > > Question is, how would I write that first line of code that gets the > ICache implementation? > > Thanks -- 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.
