1. How to work first-level cache? I`m in one session execute identical query
Code:
ICriteria cr = session.CreateCriteria(typeof(Bus)).SetCacheable(true);
, but in MSSQL evry time execute many queryes.
2. How add in NHibernate configuration second-level cache. I have all need DLL`s. In help say
To tells which cache provider to use, add in your NHibernate configuration file (can be YourAssembly.exe.config or web.config or a .cfg.xml file):
<add key="hibernate.cache.provider_class" value="XXX" />(1)
<add key="relativeExpiration" value="120" />(2)
but it`s not work.[/code]