473,670 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OutputCache with Page not working propely

guys,
I have this code in my .aspx file.
<%@ OutputCache Duration="500" VaryByCustom="O rganizationID" VaryByParam="No ne"
%>

and I have overriden the method "GetVaryByCusto nString()" in my global.asax.cs
file. whenever the organization is changed for the Page, it should invalidate
the Cache and show the new information based on the organization. it is not
doing that.
I put the breakpoints in the code.It is hitting the "GetVaryByCusto mString()"
only for the first 2 times. after that it is not going to it. and it is showing
the Cached page again and again.
Is there any way to Invalidate the Page Output before the Desired time (
in this case it is 500 secs).
any help is appreciated.
Thanks
Sudhir Sharma

Nov 19 '05 #1
1 2089
I think you need:

<%@ OutputCache Duration="500" VaryByCustom="O rganizationID" VaryByParam="*"
%>

Note hte * for the Params entry.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog
"Sudhir Sharma" <ss*****@avidxc hange.com> wrote in message
news:16******** *************@n ews.microsoft.c om...
guys,
I have this code in my .aspx file.
<%@ OutputCache Duration="500" VaryByCustom="O rganizationID" VaryByParam="No ne" %>

and I have overriden the method "GetVaryByCusto nString()" in my global.asax.cs file. whenever the organization is changed for the Page, it should invalidate the Cache and show the new information based on the organization. it is not doing that.
I put the breakpoints in the code.It is hitting the "GetVaryByCusto mString()" only for the first 2 times. after that it is not going to it. and it is showing the Cached page again and again.
Is there any way to Invalidate the Page Output before the Desired time (
in this case it is 500 secs).
any help is appreciated.
Thanks
Sudhir Sharma

Nov 19 '05 #2

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

Similar topics

2
2141
by: Sudhir Sharma | last post by:
guys, I have this code in my .aspx file. <%@ OutputCache Duration="500" VaryByCustom="OrganizationID" VaryByParam="None" %> and I have overriden the method "GetVaryByCustonString()" in my global.asax.cs file. whenever the organization is changed for the Page, it should invalidate the Cache and show the new information based on the organization. it is not doing that. I put the breakpoints in the code.It is hitting the...
6
2735
by: Tom Kiefer | last post by:
Question: If I have an ASP.NET User Control which defines/exposes a property that the page can use to specify a mode or data subset for the control to use, is there a way to tell the @OutputCache directive to vary its cache based on that property value? I.e., I have: <my:control runat="server" id="mcOne" Flag="One" /> <my:control runat="server" id="mcTwo" Flag="Two" />
1
6423
by: Johan Nedin | last post by:
Hello! I am having a problem with the @OutputCache page directive and Web browser Back Buttons. Problem: After setting <%@ OutputCache Location="None" %> on my pages I get the "Warning! Page has expired" error message, when pushing the Back Button in my Web browser.
0
1174
by: Fabio R. | last post by:
Hi, is there a way to have an HttpModule working also if the page has the OutputCache directive (<%@ OutputCache Duration="60" VaryByParam="none"%>)? I use an HttpModule to check some access permission but with the outputcache the request doesn't pass throught the module after the page is cached... Thanks, Fabio
5
2156
by: Arpan | last post by:
I am using the following code to cache the page output for 60 seconds: <%@ OutputCache Duration="60" VaryByParam="*" %> <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) lblOutput.Text = "Welcome, " & Request.Params("id") & " The time now is " & DateTime.Now.ToString("T") End Sub </script>
3
3001
by: craigkenisston | last post by:
Hi, I have some controls with these: <%@ OutputCache Duration="500" Shared="true" VaryByParam="None" %> However, I need that under certain user action, specifically, changing a value on a dropdownlist with auto-postback, the cache for the control be cleaned and the content regenerated. Is there a way to do this ?
2
2674
by: Nalaka | last post by:
Hi, I get the following error, I thought at random intervals. Then I realized, that this happens around the time tha page outputCache is set to expire. So I disabled the page output cache and the problem went away. I put in the outputcache back and the problem is back. I am using forms authentication... and asp.net 2.0. Have you seen this problem before... any help is deeply appreciated.
1
4869
by: Nalaka | last post by:
I had ..... <%@ OutputCache Duration="5000" Location="Server" VaryByParam="none" %> Then I added "browser" <%@ OutputCache Duration="5000" Location="Server" VaryByParam="none" VaryByCustom="browser" %> After I added browser... it stopped caching pages.... is there an explanation or... did I observe the problem wrong?
3
3588
by: =?Utf-8?B?TWlndWVsIElzaWRvcm8=?= | last post by:
Hi, I have an ASP.NET 2.0 application that allows content search. Search is included in all pages and a cross postback to the search results page is performed with the text inserted by the user. The search results also allows refining the search and a search button that performs a postback triggers the search. Many of the web pages in the web site have an OutputCache directive and the search results page does not. When I run the first...
0
8469
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8903
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8661
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7419
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5684
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2800
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2042
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.