Can you tell me how to use this function? Can't find an
example ANYWHERE.
I don't understand the input parameter to this function.
For example, if I've enabled page output caching for
form1.aspx in my website:
http://mysite/myapp/form1.aspx
then how would I explicitly flush that page from the page
output cache by clicking a button on another page? Here's
the button click handler:
form2.aspx.cs
private void Button1_Click(object sender, System.EventArgs
e)
{
HttpResponse.RemoveOutputCacheItem("/form1.aspx");
}
but that doesn't seem to work. The official documention on
MSDN states that the path parameter represents:
"The physical path to the items that are removed from the
cache."
Well, this is unclear to me.....do I need a physical
location on the machine to a system cache location? Or a
physical location to the physical page location as it sits
in the website? An example from Microsoft would sure be
appreciated....
thanks,
bob
bb chiverton - 03 Nov 2003 19:21 GMT
ok...figured it out...the official documentation is in
error..it states:
public static void RemoveOutputCacheItem(string path);
where path = The physical path to the items that are
removed from the cache.
WRONG!
the path parameter must be an absolute virtual path to the
file you want to remove. So, if you want to remove
http://IP/yourWebsiteRoot/yourCachedFile.aspx
then call RemoveOutputCacheItem from another page on your
website (e.g., http://IP/yourWebsiteRoot/clearCache.aspx):
HttpResponse.RemoveOutputCacheItem
("/yourWebsiteRoot/yourCachedFile.aspx");
Also, remember to specify Location='Server' in the cached
page's header:
<%@ OutputCache ... Location='Server' ...%>
Otherwise the cache deletion won't work because you've
cached the HTML output on the user's machine...
bob
>-----Original Message-----
>Can you tell me how to use this function? Can't find an
[quoted text clipped - 35 lines]
>
>.
Alvin Bruney - 03 Nov 2003 19:41 GMT
would you help microsoft help us by posting this as a bug to their support
website. that way, the documentation gets updated.
TIA

Signature
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
> ok...figured it out...the official documentation is in
> error..it states:
[quoted text clipped - 67 lines]
> >
> >.
bob - 03 Nov 2003 21:19 GMT
sure.
>-----Original Message-----
>would you help microsoft help us by posting this as a bug to their support
[quoted text clipped - 75 lines]
>
>.
bob - 03 Nov 2003 21:23 GMT
...how do I reach them to report this bug?
>-----Original Message-----
>sure.
[quoted text clipped - 92 lines]
>>
>.
Alvin Bruney - 04 Nov 2003 01:26 GMT
use this link
https://webresponse.one.microsoft.com/oas/public/assistedintro.aspx

Signature
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
> ...how do I reach them to report this bug?
> >-----Original Message-----
[quoted text clipped - 98 lines]
> >>
> >.