Can I share HttpRuntime.Cache between applications?

934 views Asked by At

I have a website setup like this:

/Web --this is the client facing site
/Web/Admin --this is the backend system and is setup as a Virtual Application

I'm using HttpRuntime.Cache for caching calls to the database. What I want to be able to do is clear something that is cached on the /Web site from the /Web/Admin site. It appears though that HttpRuntime.Cache is a single instance per application. Anyway around this without using a distributed caching system.

2

There are 2 answers

1
Ray On

I have done this with an http handler on the main site. Call the handler from your admin site with some parameter(s) to tell it what to remove from cache, then the handler cann access the cache and remove the item.

1
Kris van der Mast On

An alternative might be Windows AppFabric.