I have an ASP.NET application, and am trying to output cache a certain page, however on every request, the debugger is still hitting the OnLoad method and I get a 200 response back.
I have placed the output cache directive on a page like so:
<%@ OutputCache Duration="60" VaryByParam="None" %>
And ensured I have the OutputCache module...
I have a user control that is featured on several pages of a heavily hit site. Some of these pages include our blog sidebar, our forum sidebar, and smack right in the middle of our home page. That means this control is rendered a lot. The control it meant to read in a twitter RSS feed for a specific account and write out the last 2 tweet...
Hi folks,
after digging into this topic and having the requirement, that a single page should be totally cached, except for a
Html.RenderPartial("LogOnUserControl");
i couldn't find any working solution on this...
the only "its getting warmer" solution i found was this one , which unfortunately is not working with a "partial view", ...
What is the difference between configuring a Caching Profile in Web.Config and configuring it in IIS?
If you have this in Web.Config
<caching>
<outputCache enableOutputCache="true" />
<outputCacheSettings>
<outputCacheProfiles>
<add duration="14800" enabled="true" varyByParam="*"
name="Asset...
We have some problem with dissapearing content in UserControl when OutputCache used.
Sometimes it just does not display.
And it displayed again when cache duration expired.
When we restart application pool it become noramaly for a few time.
We cache news with:
<%@ OutputCache Duration="300" VaryByParam="none" VaryByCustom="NewsContro...
Hi folks,
When I add either one of these ...
<%@ OutputCache Duration="600" Location="Any" VaryByParam="*" %>
or
<%@ OutputCache CacheProfile="CmsArticlesListOrItem" %>
(.. and this into the web.config file...)
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="CmsArticlesListOrItem" duration="...
Hi ,
Suppose I have a page abc.aspx in it I have a user control ucx123.ascx. I am fragment caching the user control and the cache is vary by param. The parameter is some id in the querystring.
I want to add a sql cache dependency with respect to sql query.
The scenario is I added the dependency but the cache is not invalidating
...
Hello,
To configure aspx pages' OutputCache from one place, there is a great tool which is the CacheProfile attribute in <%@ OutputCache %> associated with a custom cache profile defined in the web.config :
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="myProfile" duration="300" />
</ou...
I want to use an Enum value for the types of VaryByCustom parameters I will support, is it possible to do this?
I tried setting it in the page itself
<%@ OutputCache Duration="600" VaryByParam="none"
VaryByCustom='<%=VaryByCustomType.IsAuthenticated.ToString(); %>' %>
But this returned the entire literal string "<%=VaryB...
Hi,
I read at Scottgu blog about using OutputCache for a function but this didn't worked for me. How can I use [OutputCache(Duration=60)] for a function and can I add VaryByParam in this statement? Which namespace is required?
...
I just upgraded my site from ASP.NET 3.5 to 4.0. I've been working through some breaking changes and there were more than I expected.
One I can't figure out, however, is why my <asp:Substitution /> control suddenly stopped working like it should. It's supposed to ignore the output cache settings of the parent page and update upon ev...
Hi,
I'm implementing Outputcache in my application and it works fine, but the first time always take a lot to load and the next following request will be faster...
I would like to know if there is a way to initiate the page caching on the server side and serve the cached page upon the very first request, rather than have it triggered b...
Is it possible to detect whether an ASP.NET Page is about to be cached and if so, how?
The HttpCachePolicy object provides only set-methods. The VaryByParams name-value collection is useless if values other than "None" and "*" are set as it impossible to enumerate them and you can only access them by key.
Additionally, I cannot use Ref...
Hi,
I have an ASP.net application (c#).
When a user is on a specific page, they click a link on this page that takes them to a child page, displaying the product details.
If the user clicks the browser back button, I need the parent page to be refreshed to its initial state. ie all text boxes that had data typed need to be blank, any ...
Hi folks,
i've got a website that uses OutputCache attribute to cache pages. Works great.
Now, I'm in the middle of R&D'ing scaling up this site to be in a web farm. Along with the usual suspects for webfarm pain ... I've noticed (pretty quickly/obviously) that the OutputCache from Server_A doesn't invalidate the OutputCache from Serve...
Hello,
I use LINQ queries in my ASP.NET MVC application and want to use OutputCache in some of my Actions.
I hear this should be possible with CommandNotifications. But those seem to only go for self-created SQLCommands, or am I wrong?
Can I manually tell SQL server to send SQLDependency notifications if certain tables change? And if...
I'm trying to do some caching using VaryByParam AND VaryByHeader. When an AJAX request comes in I return a partial XHTML. When a regular request comes in I send the partial XHTML page with header / footer.
I tried to cache the page by doing:
[OutputCache( Duration = 5, VaryByParam = "nickname,page", VaryByHeader = "X-Requested-With" )]...
I use OutputCache in an ASP.net MVC application. As developing with an active OutputCache is not very pleasant I want to disable the OutputCache on the Development Systems (local machines and development server).
What is the best way to do this?
...
Hi folks,
I've got a website that has a number of host headers. Depending on the host header, the results are different - both visually (theme'd) and data.
So lets imagine i have a website called 'Foo' - that returns search results (original, eh?).
Now, the same code runs both sites. It is physically the same server/website (using Hos...
Here's my control's code behind:
<PartialCaching(60, Nothing, "UsrCtl_WebUserControl.CacheString", Nothing, True)> _
Partial Class UsrCtl_WebUserControl
Inherits System.Web.UI.UserControl
Private _CacheString As String
Public Property CacheString() As String
Get
Return _CacheString
End Get
Set(ByVal value As String)
_Ca...