0

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.

3 Answers 3

3

If you're working with Cloud Services (Web/Worker Roles), did you ever consider using Windows Azure Caching? Besides the fact that it's faster and free (part of your deployment), you can use it wen developing locally (thanks to the emulator), when running in Windows Azure both in your 'test' deployment and production deployment without extra cost or without having to play with configuration files.

1
  • Yes, I am planning to use Windows Azure Caching on Azure. I have a set of N web application - some of which is going to be InPrem, and some of which is going to be in Azure. Among the InPrem ones, I have some application which won't use AppFabric caching and some which will. I am trying to come up with a Generic Caching DLL to serve all the clients.
    – vijayst
    Jan 23, 2013 at 8:52
0

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.

1
  • Thanks, looks interesting. I am looking at a more standard framework like Enterprise Library - Caching block to do the trick. Is it possible?
    – vijayst
    Jan 22, 2013 at 7:27
0

Why not just use ASP.NET caching? In the web.config you can set it to InProc on development environments. Once in Azure you can set it to SQL or some other shared provider.

1
  • I have to switch between in-memory caching in dev environment, vs AppFabric caching in production environment. Also, Appfabric caching is a standby - Not sure if AppFabric caching will indeed be used in production (still in discussion). So have to come up with something generic that will work in all three scenarios
    – vijayst
    Jan 22, 2013 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.