473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

cache object

All,

I am using the asp.net cache object to hold some static data for my website
that is retrieved from my SQL 2000 DB. What I would like to know is that if
I stop my website in Win2k/IIS for a few minutes will this clear out the
cache?

If not how can I achieve this i.e. by stopping my site all cache data is
cleared.

Thanks
Msuk

Jul 4 '06 #1
5 2755
The cache data is stored in the asp.net worker process. Restarting your IIS
service should kill it, and the cache also. Simply touching your web.config
should do the same thing.

Karl

--
http://www.openmymind.net/

"msuk" <ms**@discussions.microsoft.comwrote in message
news:3E**********************************@microsof t.com...
All,

I am using the asp.net cache object to hold some static data for my
website
that is retrieved from my SQL 2000 DB. What I would like to know is that
if
I stop my website in Win2k/IIS for a few minutes will this clear out the
cache?

If not how can I achieve this i.e. by stopping my site all cache data is
cleared.

Thanks
Msuk

Jul 4 '06 #2
HI,

Restarting IIS is not possible for me as my site is part of a farm. So
editing the Web.config is the only way?

Thanks
Msuk

"Karl Seguin [MVP]" wrote:
The cache data is stored in the asp.net worker process. Restarting your IIS
service should kill it, and the cache also. Simply touching your web.config
should do the same thing.

Karl

--
http://www.openmymind.net/

"msuk" <ms**@discussions.microsoft.comwrote in message
news:3E**********************************@microsof t.com...
All,

I am using the asp.net cache object to hold some static data for my
website
that is retrieved from my SQL 2000 DB. What I would like to know is that
if
I stop my website in Win2k/IIS for a few minutes will this clear out the
cache?

If not how can I achieve this i.e. by stopping my site all cache data is
cleared.

Thanks
Msuk


Jul 4 '06 #3
I'm pretty sure the HttpCache class implements IEnumerable, so you can loop
through it and remove each item. You could put this functionality behind a
password-protected page or something.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"msuk" <ms**@discussions.microsoft.comwrote in message
news:D3**********************************@microsof t.com...
HI,

Restarting IIS is not possible for me as my site is part of a farm. So
editing the Web.config is the only way?

Thanks
Msuk

"Karl Seguin [MVP]" wrote:
>The cache data is stored in the asp.net worker process. Restarting your
IIS
service should kill it, and the cache also. Simply touching your
web.config
should do the same thing.

Karl

--
http://www.openmymind.net/

"msuk" <ms**@discussions.microsoft.comwrote in message
news:3E**********************************@microso ft.com...
All,

I am using the asp.net cache object to hold some static data for my
website
that is retrieved from my SQL 2000 DB. What I would like to know is
that
if
I stop my website in Win2k/IIS for a few minutes will this clear out
the
cache?

If not how can I achieve this i.e. by stopping my site all cache data
is
cleared.

Thanks
Msuk



Jul 4 '06 #4
Hi,

Would you have an example of this?

Thanks
Msuk

"Karl Seguin [MVP]" wrote:
I'm pretty sure the HttpCache class implements IEnumerable, so you can loop
through it and remove each item. You could put this functionality behind a
password-protected page or something.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"msuk" <ms**@discussions.microsoft.comwrote in message
news:D3**********************************@microsof t.com...
HI,

Restarting IIS is not possible for me as my site is part of a farm. So
editing the Web.config is the only way?

Thanks
Msuk

"Karl Seguin [MVP]" wrote:
The cache data is stored in the asp.net worker process. Restarting your
IIS
service should kill it, and the cache also. Simply touching your
web.config
should do the same thing.

Karl

--
http://www.openmymind.net/

"msuk" <ms**@discussions.microsoft.comwrote in message
news:3E**********************************@microsof t.com...
All,

I am using the asp.net cache object to hold some static data for my
website
that is retrieved from my SQL 2000 DB. What I would like to know is
that
if
I stop my website in Win2k/IIS for a few minutes will this clear out
the
cache?

If not how can I achieve this i.e. by stopping my site all cache data
is
cleared.

Thanks
Msuk



Jul 4 '06 #5
maybe something like

IDictionaryEnumerator enumerator = Cache.GetEnumerators();
while (enumerator.MoveNext())
{
Cache.Remove(enumerator.Key);
}

or something similar..

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
netwrote in message news:OV**************@TK2MSFTNGP02.phx.gbl...
I'm pretty sure the HttpCache class implements IEnumerable, so you can
loop through it and remove each item. You could put this functionality
behind a password-protected page or something.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"msuk" <ms**@discussions.microsoft.comwrote in message
news:D3**********************************@microsof t.com...
>HI,

Restarting IIS is not possible for me as my site is part of a farm. So
editing the Web.config is the only way?

Thanks
Msuk

"Karl Seguin [MVP]" wrote:
>>The cache data is stored in the asp.net worker process. Restarting your
IIS
service should kill it, and the cache also. Simply touching your
web.config
should do the same thing.

Karl

--
http://www.openmymind.net/

"msuk" <ms**@discussions.microsoft.comwrote in message
news:3E**********************************@micros oft.com...
All,

I am using the asp.net cache object to hold some static data for my
website
that is retrieved from my SQL 2000 DB. What I would like to know is
that
if
I stop my website in Win2k/IIS for a few minutes will this clear out
the
cache?

If not how can I achieve this i.e. by stopping my site all cache data
is
cleared.

Thanks
Msuk



Jul 4 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jim | last post by:
Hi, I have a few questions regarding the cache object: Does the cache object exist through postbacks? The cache object only exists for the current request, right? Is there a way to cache...
1
by: Glenn | last post by:
Hi, I have a config XML file that I am using from the application cache. I have configured the entry with a remove callback to re-populate cache automatically when the XML file changes. All is...
4
by: NWx | last post by:
Hi, I' trying to implement a callback method when a cache object expires I want to do this to automatically logout user after a timeout (for demo purposes) My thought is, when user logon,...
9
by: Joe Fallon | last post by:
If I add an instance of an object to the Cache what is returned when I request the item from the cache? Is it a clone of the object or is it a reference to the object? I want to know because I...
13
by: Fernando Chilvarguer | last post by:
Hi, I'm retriving data from a database and storing it on the Cache Object using the following code: HttpContext.Current.Cache.Insert( cacheItemKey, contentDS, //THE DATASET WITH MY DATA...
1
by: Brian Linden | last post by:
I cache a ton of stuff, and my application works great....but...... When I am stress testing it I'll get the "Object reference not set to an instance of an object" every once in a while... It...
2
by: Ryan Ternier | last post by:
I'm playing around with Cache and Viewstate. I've made a small little example that reminds me of grade 12: if(!IsPostBack) { ArrayList alTest = new ArrayList(); alTest.Add("This is from...
6
by: Charts | last post by:
I used HttpContext.Current.Cache To cache data from database. The code is like that. public static DataView GetCategories() { if ( HttpContext.Current.Cache == null ) {...
1
by: William Sullivan | last post by:
I'm trying to nail down some issues with the cache in my application. Currently, I have an object that stands between my business logic and database logic called CacheLogic (cute, no?). ...
1
by: Jose Fernandez | last post by:
Hello First of all, sorry for my bad english ;) I have a USER class that i create to every user that enters the website (not neccesarily logged in). At the same time i insert it into a the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.