Search code examples
asp.net-mvccachingazureappfabric

Caching framework for ASP.NET MVC / Azure


I am building an ASP.NET MVC application, which may be hosted in Azure. Multiple instances of the application may be running in Azure. We may or may not use Azure AppFabric Caching.

How do we structure the caching framework so that:

  1. Caching works in-memory for the development environment.
  2. Caching works (in some sort of way) in Azure without AppFabric Caching.
  3. Caching works in Azure prod environment using AppFabric Caching.

All of the above should be working with some switches in the configuration files.


Solution

  • have a look at this as well: http://nuget.org/packages/Glav.CacheAdapter

    A generic cache mechanism that provides config switching between memory, ASP.NET web, AppFabric and memcached cache.