outputcache

Does the OutputCacheFilter in the Microsoft MVC Preview 4 actually save on action invocations?

We deployed a live, fresh, swanky site using preview 3 including rigorous stress testing. Page Output caching was our saviour and afforded us the ability to meet our performance contractual requirements. My question is, is there a difference between action OutputCacheFilter and page output caching? Is the action output caching faster...

Clearing Page Cache in ASP.NET

For my blog I am wanting to use the Output Cache to save a cached version of a perticular post for around 10 minutes, and thats fine... <%@OutputCache Duration="600" VaryByParam="*" %> However, if someone posts a comment, I want to clear the cache so that the page is refreshed and the comment can be seen. How do I do this in ASP.Net ...

How to Clear OutputCache for Website without Restarting App

Is there a way clear or reset the outputcache for an entire website without a restart? I'm just starting to use outputcache on a site and when I make a mistake in setting it up I need a page I can browse to that will reset it. ...

How to set the output cache directive on custom controls with no code in front

I've written a control that inherits from the System.Web.UI.WebControls.DropDownList and so I don't have any code in front for this control, but I still want to set the OutputCache directive. I there any way to set this in the C# code, say with an attribute or something like that? I'm particularly hoping to be able to replicate the V...

What's the best way to cache a user control or its associated data in asp.net mvc

Hi guys, I am in the middle of implementing an application using ASP.NET MVC and would love to cache the data passed to user controls or the output rendering on some user controls that I render using the Html.RenderPartial, that way I don't have to query the DB with every request I do to the controller for a new view. Thanks. ...

ASP.Net MVC Output Caching: The directive or the configuration settings profile must specify the 'varyByParam' attribute.

I encountered the above error message after applying the OutputCache attribute on ActionResult methods with no input parameters - why would I use VaryByParams in this case? Is this a bug in ASP.Net MVC or is there a way of using OutputCache without setting this property? My big question is, if I have to use VaryByParams, what should I e...

ASP.NET MVC OutputCache doesn't work for root URI

I'm learning ASP.NET MVC and bugged by one issue. In the HomeController, the Index action has OutputCache attribute, but it seems doesn't work. [HandleError] public class HomeController : Controller { [OutputCache(Duration=5, VaryByParam="none")] public ActionResult Index() { ViewData["Title"] = "Home Page" + DateTi...

OutputCache and recording unique views?

Hi folks, Image i have a view that is cached with the OutputCache attribute but i still need to increment a counter that records that the page has been viewed, how could i do it? I thought about creating my own Custom ActionFilterAttribute, and using Action Filter Order of Execution to record this .. but i'm not sure it will work. eg....

Output Caching - GetVaryByCustomString based on value set in PageLoad()

I am using ASP.net Output Caching and want to implement GetVaryByCustomString () version of it. However I've gotten into a problem when the cache is based on a value set in the PageLoad() of a page. When Default.aspx load, the version of the USER CONTROL I would like to show is based on the URL which needs to go through a database query...

Expire Output Cache ASP.Net MVC

I am using the standard outputcache tag in my MVC app which works great but I need to force it to be dumped at certain times. How do I achieve this? The page that gets cached is built from a very simple route {Controller}/{PageName} - so most pages are something like this: /Pages/About-Us Here is the output cache tag that is at the to...

Is there any way to avoid duplicate page cache entries while allowing for case-insensitive URLs?

If I have a page with outputcaching (let's call it Employees.aspx) which accepts one parameter (through querystring) called Company like this: http://www.example.com/Employees.aspx?Company=Google How can I avoid duplicate page cache entries for differently cased URLs like: http://www.example.com/Employees.aspx?Company=GOOGLE http:/...

Asp.Net OutputCache and Expiration

I am using the Asp.net OutputCache on a page containing a usercontrol that in certain circumstances when the usercontrol is edited i want to be able to expire the page cache and reload the page with fresh data. Is there any way i can do this from within the usercontrol? If not, what are some other methods of caching the page that will ...

Can I use the ASP.NET 'OutputCache' control to cache images without a performance hit?

I have some ASP.NET MVC actions that generate images dynamically (although it could equally be an ASPX page). I'm using [OutputCache] to cache these images. I'm just wondering if I need to worry about ASP.NET caching images in memory and taking up too many resources. These are product images of varying sizes for a shopping cart contain...

What's the best method for forcing cache expiration in ASP.NET?

Suppose I have an ASP.NET application running across several web servers behind a load balancer: Can I: Force OutputCache (Page and/or Control level) to expire globally? Force Data Cache (i.e. Cache.Insert) to expire? Monitor ASP.NET caching usage (keys, RAM, etc) from a central location? One possible solution would be to have every...

How best to work with the Expires header in ASP.NET MVC?

I want to be able to set a long expires time for certain items that a user downloads via GET request. I want to say 'this is good for 10 minutes' (i.e. I want to set an Expires header for +10 minutes). The requests are fragments of HTML that are being displayed in the page via AJAX and they're good for the user's session. I don't want t...

Caching strategy, Output Cache vs Data Cache or both?

I'm working on an ASP.NET MVC project and I've come to the point where I want to start considering my caching strategy. I've tried to leave my framework as open as possible for the use in caching. From what I heard during Scott Hanselman's podcast StackOverflow.com uses page output caching and zips that content and puts it into RAM. T...

ASP.NET Charting and User Control Output Caching

I'm using the new asp.net chart control within a user control. I tried to use the output cache directive to cache the user control for 30 seconds. The caching is custom depending on the logged in user. The chart data is being lost while the control is cached. I see the chart one every 30 seconds but at no point inbetween. Am I missing s...

Using the ASP.NET AJAX UpdatePanel with output caching

Is there a way to have the UpdatePanel control play nicely with output caching? I'd like to cache an entire ASP.NET page using the @OutputCache directive, EXCEPT for the UpdatePanel area. ...

OutputCache Bug with VarByParam="None" with MVC RC refresh

Came across to this defect with ASP.NET RC refresh while using VaryByParam="" instead of VaryByParam="None". Caching WORKS, but page http://www.yoursite.com and http://www.yoursite.com/home/index will be cached separately it seems. What is the difference between VaryByParam="" and VaryByParam="None"? edit : I mean VaryByParam="" not ...

How to output cache files and do custom logging - jboss/java project

I am a .Net developer who is starting to do more and more Java development at work. I have a specific question about caching that I hope you guys can solve or offer suggestions. We are starting a java project that will be deployed on a Linux box running JBoss. We are planning ahead and try to think about our caching strategy. One thi...