0

I would like to know how I can implement caching for multiple IIS websites. I have different applications which use the same queries I cached.

I made a simple cache service that uses System.Web.Caching.Cache but this only works per website.

How can I achieve the same caching for all of my websites? These are all on the same (virtual) webserver.

Can I use NCache for this problem?

Thanks for any help!

Solution

For testing purpose I installed a Couchbase server using Memcached on my computer and this seems to work very nice. Now I just wonder can I install this on my webserver or should I make a new virtual server for the caching?

Nanou Ponette
  • 1,372
  • 4
  • 22
  • 46
  • You can use any distributed caching system really. memcached, NCache, Redis, etc.. There are a lot of solutions out there, but recommending a tool is outside the scope of this site. You might try googling on "distributed cache". Be aware, NCache is insanely expensive. – Erik Funkenbusch May 10 '17 at 15:17
  • Personally, I'd go with Redis, as Microsoft has done a lot of work to integrate it into their platform because it's what Azure uses. In addition to using it for distributed caching, you can also use it as your session store and the backing for OutputCache. – Chris Pratt May 10 '17 at 15:23
  • Can I install one of these systems on my webserver or do I need a separate server for this? – Nanou Ponette May 11 '17 at 07:11
  • I'd use Redis, and use http://cachemanager.michaco.net to handle all the tricky stuff for me. Yes you can install Redis on the same server, if you don't rely on the cache, you don't need a cluster – MichaC May 12 '17 at 07:00

1 Answers1

1

Any distributed cache such as Memcached, NCache, Redis etc should help resolve this issue for you. You keep data in a central repository and direct all your applications to use the same shared cache. NCache is a .NET distributed cache so if you have already worked with System.Web.Caching.Cache then you will find NCache API very similar.

Shoeb Lodhi
  • 156
  • 1
  • 2