asp.net cache sharing between main site add its applications/virtual directories (using iis 7.5)

StackOverflow https://stackoverflow.com/questions/8746095

سؤال

My solution contains 4 projects: Core, Data (libraries), Admin, Client (MVC 3 sites).

Admin and Client communicate with DB with Data project's repositories.

I want to cache data in Data project using HttpContext.Current.Cache for both Admin and Client and invalidate cached data after updates that can appear both in Admin and Client.

How should I configure sites, applications or virtual directories and app pools to have the same cache in Client and Admin?

هل كانت مفيدة؟

المحلول

You can't share the standard ASP.NET cache across applications. However, you can use tools like memchached or Velocity by Microsoft.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top