caching - NHibernate 2nd Level Cache Provider Differences -


i've been using nhibernate while now, i'm still wondering differences between the second level cache providers ?

  • do perform better\worse ?
  • what popular , why ?

for clarity i'm talking about:

  • nhibernate.caches.memcache
  • nhibernate.caches.prevalence
  • nhibernate.caches.sharedcache
  • nhibernate.caches.syscache
  • nhibernate.caches.syscache2
  • nhibernate.caches.velocity

and i'm sure there others.

thanks

comparing these cache providers boils down comparing memcached vs prevalence vs velocity, etc, , not related nhibernate.

here reasons (by no means complete list) pick 1 on others:

if want keep simple , don't run app in farm, might want use syscache/prevalence, runs in-proc. if use ms sql server, use syscache2.

if need huge cache across many cache-dedicated servers, might want use memcached, can run on linux you'd avoid licensing costs.

if application runs on azure or uses appfabric, might want use velocity.

personally prefer caching myself @ higher level data access (only when necessary), make caching more intentional , meaningful entities , embrace more data access in cache. in designed system, caching can transparent using decorators or proxies.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -