Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET - Multiple Web applications - Sharing cache objects [closed]

I'm working on asp.net 4 web project , The project is build with 3 sub projects:

  • Site.Admin - Admin Website - ASP.NET Project
  • Site.Core - DB & BL - C# Library
  • Site.Web - Frontend Website. - ASP.NET Project

The project is hosted on a Single windows server 32 bit

I'm currently using ASP.NET Cache (HttpRuntime.Cache) to cache objects but the problem is that i cant share the cache between Frontend & Admin Websites.

From reading StackOverflow and other posts , i understand that the following options exist:

  1. Memcached - No stable windows version ?
  2. Couchbase - No free version ? overkill to replace asp.net cache ?
  3. AppFabric
  4. Redis - No stable windows version?

I'm looking for a free/non paid solution to replace asp.net cache.

I'd like to get some input regarding :

  1. Windows install compatibility

  2. Performance

  3. Ease of use (replacing existing cache code) & .NET API.

  4. Other alternatives ?

like image 693
RuSh Avatar asked Dec 16 '13 20:12

RuSh


1 Answers

I've come across this same problem and we went with AppFabric. We needed to share caching between two web apps, on the same server.

AppFabric is pretty easy to install on a Windows machine and it's easy enough to replace calls to the runtime caching with calls to AppFabric. It is however very important that you decide how you're planning on using this cache, or, how many times.

In a project for a client we needed to build in an extra app next to a legacy app not knowing how many times this legacy app addressed the runtime cache. Apparently, and this only became apparent after switching to AppFabric, the cache was not properly used at all. And now this became painfully obvious, since calls to AppFabric are that much slower than putting objects in the runtime cache (AppFabric uses WCF to communicate with the web apps, where runtime caching directly puts objects in memory). AppFabric isn't slow, but it's significantly slower than runtime caching, so use wisely.

But this legacy app made thousands of calls to the cache (yeah, I know). So just run a couple of tests whether this will work for your situation.

like image 190
Aage Avatar answered Nov 15 '22 07:11

Aage