Questions tagged [outputcache]

OutPut Cache is the caching technique to cache the static pages in ASP.NET.

680 questions
4
votes
2 answers

Is there a way to have OutputCache ignore the master page in asp.net mvc?

I have an action that returns a view with a master page with a logon user control at the top. When I set outputcache, it caches the entire output including the current user, so everybody would see whoever was the last person to hit the page to…
mynameiscoffey
  • 15,244
  • 5
  • 33
  • 45
4
votes
3 answers

MVC OutputCache for Child Actions: where is it stored?

I'm using OutputCache for caching an horizontal menu and a vertical menu in my app. I usually use something like this in the actions I want to be cached [OutputCache(Duration=3600, VaryByParam="none", Location=OutputCacheLocation.Client,…
4
votes
2 answers

OutputCache not working when using Reponse.Cookies

I'm trying to cache an ActionResult. In a particular ActionResult I'm writing some data to cookies. The output cache is not working in that action result. Its working fine with all other actions where I'm not using Response.Cookies. Please help me…
4
votes
2 answers

Outputcache - how to determine optimal value for duration?

I read somewhere that for a high traffic site (I guess that is a murky term as well), 30 - 60 seconds is a good value. Obviously I could do a load test and vary the values, but I couldn't find any kind of documentation on this. Most samples have a…
Steve
  • 5,802
  • 12
  • 54
  • 76
4
votes
1 answer

Exclude Dynamic Rendered User Control From Output Caching

We have a site (actually an Application Builder) that rendered a lot of user controls in different scenarios, One day the manager decided to add Output cache in the main page, OK, every things is fine and the request responded very fast! But in…
Saeid
  • 13,224
  • 32
  • 107
  • 173
4
votes
2 answers

Why does Web outputCache config section pointing at Azure Shared Cache slow down every request?

My question is similar to this one, but my issue is with Windows Azure Shared Caching -- not the newer Windows Azure Caching. It's really a strange issue. I have a shared azure cache set up and working on one hosted cloud service. The app is using…
4
votes
1 answer

How to Avoid Global.asax for 'VaryByCustom' caching

I am writing a custom HttpModule and I need to use: Response.Cache.SetVaryByCustom("role"); Basically, I need to cache responses based on a user's membership role. All my research has pointed me to the…
Alfero Chingono
  • 2,663
  • 3
  • 33
  • 54
4
votes
2 answers

displaymode for mobile with desktop view for ipad in asp.net mvc 4

Hi I have a MVC 3 application, recently converted to mvc 4 and added mobile views. I want to add displaymodes for Mobile with desktop view for tablets specially for iPad(traffic mainly from here). I have it like this in my…
user720719
  • 41
  • 2
  • 5
4
votes
2 answers

ASP.net - Caching by Query-String (VaryByParam)

In which situations should we use Query-Strings (VaryByParam) to achieve Caching in ASP.NET? Can anyone give an example of a real-life situation in case of an web-application?
user366312
  • 16,949
  • 65
  • 235
  • 452
3
votes
2 answers

Cache dropbox items in MVC razor. How to do that?

How can i cache my items and values for dropdown list in MVC? Is there a way to do so? I am doing that in controller. Sample code is....... public ActionResult Index() { RegionTasks regionTasks = new RegionTasks(); …
amit patel
  • 2,287
  • 8
  • 31
  • 45
3
votes
2 answers

OutputCache by user. Bug when I logout

I did a GetVaryByCustomString that returns: context.User.Identity.IsAuthenticated.ToString(); But I have a big problem, imagine this flow: The user(or anyone) access the home page. GetVaryByCustomString will return "false" and cache that. Every…
Felipe Pessoto
  • 6,855
  • 10
  • 42
  • 73
3
votes
2 answers

Remove action from Output Cache

ASP.Net MVC 3. I found similar questions/answers, but none seem to fix this issue... Similar: HttpResponse.RemoveOutputCacheItem is not working How to "invalidate" portions of ASP.NET MVC output cache? I am using OutputCache to cache a…
B Z
  • 9,363
  • 16
  • 67
  • 91
3
votes
1 answer

Is it possible to configure IIS 7.5 output caching for an individual page?

We'd like to use IIS 7.5 output caching for an individual .aspx file, but after some reading at iis.net, it seems to me the caching can only be configured for various file extensions, but not for individual files. Is that correct or did I miss…
michalstanko
  • 579
  • 5
  • 19
3
votes
1 answer

ASP.NET MVC3, How to Use Different OutputCacheProfile to Different User Role?

I know I can setup OutputCacheProfiles at web.config file. I like to know how to apply different cache profile to different user role on page (controller) level?
Eric Yin
  • 8,737
  • 19
  • 77
  • 118
3
votes
1 answer

using Caching in user control and VaryByControl

I have a user control in my asp.net application that load it's data from cache. i want it's cache be updated when the value of a variable be changed so i put this code on page directive <%@ OutputCache Duration="1000" VaryByParam="none" …
Vahid Ghadiri
  • 3,966
  • 7
  • 36
  • 45