views:

434

answers:

2

Ok, strange setup, strange question. We've got a Client and an Admin web application for our SaaS app, running on asp.net-2.0/iis-6. The Admin application can change options displayed on the Client application. When those options are saved in the Admin we call a Webservice on the Client, from the Admin, to flush our cache of the options for that specific account.

Recently we started giving our Client application >1 Worker Processes, thus causing the cache of options to only be cleared on 1 of the currently running Worker Processes.

So, I obviously have other avenues of fixing this problem (however input is appreciated), but my question is: is there any way to target/iterate through each Worker Processes via a web request?

A: 

I'm making some assumptions here for this answer....

  1. I'm assuming the client app is using one of the .NET caching classes to store your application's options?

  2. When you say 'flush' do you mean flush them back to a configuration file or db table?

Because the cache objects and data won't be shared between processes you need a mechanism to signal to the code running on the other worker process that it needs to re-read it's options into its cache or force the process to restart (which is not exactly convenient and most likely undesirable).

If you don't have access to the client source to modify to either watch the options config file or DB table (say using a SqlCacheDependency) I think you're kinda stuck with this behaviour.

Kev
A: 

I have full access to admin and client, by cache, I mean .net's Cache object. By flush I mean removing the item from the Cache object.

I'm aware that both worker processes don't share the cache data. That's sort of my conundrum)

The system is the way it is to remove the need to hit sql every new-session that comes in. So I'm trying to find a solution that can just tell each worker process that the cache needs to be cleared w/o getting sql involved.

Revoked