Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best cache for Nhibernate when using an MVC web app?

if you were using Nhibernate for data access in an MVC app what would be the best cache provider e.g. Syscache,Syscache2,Memcache,HashTable.. to use?

Thanks for your opionions.

like image 740
Richard Avatar asked Mar 11 '09 23:03

Richard


1 Answers

HashTable is the default built-in cache provider. It is recommended not to use this one.

  • SysCache uses System.Web.Caching.Cache as the cache provider
  • SysCache2 is basically the same except it also supports SQL dependency-based expiration. It requires MSSQL 2000+.

In most scenarios (non webfarm), the SysCache provider should be good enough.

For more information check out the documentation on NHibernate.Caches

like image 175
Joey V. Avatar answered Oct 12 '22 22:10

Joey V.