Accessing Web Server Cache from a C# Application or Service

J

Joe Messano

Hello,

I have an ASP.NET (C#) site that pulls data from various sources,
processes that data and creates several DataViews. I then take these
DataViews and store them in the Web server's Cache, which expires
every 10 mins or so. The main page pulls these DataViews from the
Cache and binds them to a DataGrid.

This works, however the first user that hits the cache after it has
expired has to sit for 45 seconds or so while all the data is
gathered, made into DataaViews, and and stored in the Cache.

What I want to do is build a separate C# Service or Application (will
run at low priority) to gather the data, create the DataViews, and
store them to the web server's Cache, where it would be accessible to
my ASP.NET pages.

The problem is, I cannot find a way to access the web server's Cache
from a separate Windows application. Is there any way to have a C#
Windows Application write to the Cache used by my ASP.NET Web
Application?

Hope you can help. Thanks in advance.
-Joe
 
D

David Browne

Joe Messano said:
Hello,

I have an ASP.NET (C#) site that pulls data from various sources,
processes that data and creates several DataViews. I then take these
DataViews and store them in the Web server's Cache, which expires
every 10 mins or so. The main page pulls these DataViews from the
Cache and binds them to a DataGrid.

This works, however the first user that hits the cache after it has
expired has to sit for 45 seconds or so while all the data is
gathered, made into DataaViews, and and stored in the Cache.

What I want to do is build a separate C# Service or Application (will
run at low priority) to gather the data, create the DataViews, and
store them to the web server's Cache, where it would be accessible to
my ASP.NET pages.

The problem is, I cannot find a way to access the web server's Cache
from a separate Windows application. Is there any way to have a C#
Windows Application write to the Cache used by my ASP.NET Web
Application?

You don't need another application, just another thread.

Run a background thread to populate the data, sleep, populate, etc.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top