473,378 Members | 1,400 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,378 software developers and data experts.

asp.net caching expiration problem

Hi, I am trying to use ASP.NET caching like that :

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If Not (Cache("test") Is Nothing) Then
Response.Write(Cache("test"))
Else
Cache.Insert("test", "woot woot", Nothing,
Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(5))
Response.Write("Cache initialized")
End If
End Sub

It works well, except for the expiration. When Cache("test") is being
initialized and I hit refresh, it shows "woot woot", but only for a few
seconds (I keep hitting F5). Whatever number I put instead of 5 doesn't
change a single thing, nor if I try New TimeSpan(0, 5, 0) instead of
TimeSpan.FromMinutes(5)

Am I doing anything wrong?

thanks

Aug 12 '06 #1
0 902

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

Similar topics

0
by: Martin | last post by:
Hi. I had a very frustrating afternoon and evening but I have got it all under control now so all of a sudden I am in a good mood. I want to share some insights on output caching with you lot. ...
0
by: Scott Simes | last post by:
Keywords: image cache caching css stylesheet expire expiration asp.net c# ================================================== Note: I posted this on the caching ng but no one responded... I'm...
13
by: Rohit | last post by:
I need to turn off caching in my ASP.NET page. I have set the following code in Page Load event: Response.Cache.SetCacheability(HttpCacheability.NoCache) Still, sometimes the page is retreived...
3
by: lanem | last post by:
I am working on a ASP.NET 2.0 web site that has some PDFs that users can download. I'm using an HTTP module to see if the user has permission to view the PDF before loading it. This all works...
1
by: Random | last post by:
What about query caching in a Web Service? I am creating a Web Service that I would like to have some database information persist in memory as long as requests are being issued against the...
76
by: kwilder | last post by:
This works, but it doesn't load the latest version of the xml if it was just modified without closing and reopening the browser. Here's the scenario: I have an xml doc called results.xml. It...
6
by: spacehopper_man | last post by:
I'm considering ditching all use of Session state in favour of Application state. This is because - from what I can work out - it will be more memory efficient for me. I have three questions:...
2
by: sternr | last post by:
Hey, (Sorry if the thread has been posted twice!) I'm using the System.Web.Caching.Cache object in my Win App and basically, it's great! I use a sliding expiration TimeStamp to the object I put...
1
by: Smokey Grindle | last post by:
is there a way to cache only Javascript and images on the client? it seems that we are spending most of our time pushing out images and java scripts, but these never change! so whats the point of...
0
by: ibiza | last post by:
Hi, I am trying to use ASP.NET caching like that : Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not (Cache("test") Is Nothing) Then...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.