Questions tagged [outputcache]

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

680 questions
4
votes
1 answer

removing Output cache in Index view on update in asp.net mvc

I'm using output caching for some Index views because they contain a lot of data. I want to keep it specific for every user. because the view can differ depending on the roles. [OutputCache(Duration = 3600, VaryByParam = "none", Location =…
Stefanvds
  • 5,868
  • 5
  • 48
  • 72
4
votes
1 answer

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…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
4
votes
3 answers

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…
John Boker
  • 82,559
  • 17
  • 97
  • 130
4
votes
4 answers

Nested partial output caching in ASP.NET MVC 3

I am using Razor view engine in ASP.Net MVC 3 RC 2. This is part of my view city.cshtml (drastically simplified code for the sake of simplicity in example)
@foreach(var product in…
Anwar Chandra
  • 8,538
  • 9
  • 45
  • 61
4
votes
0 answers

How to cache on both client and the server in ASP.NET MVC?

In my website I have some pages which need to be cached on both server and client. [OutputCache(Location= OutputCacheLocation.ServerAndClient, Duration=3600)] But in the above attribute ServerAndClient option simply says client or server not…
ozgur
  • 2,549
  • 4
  • 25
  • 40
4
votes
1 answer

Remove OutputCache with multiple VaryByParam

I have a action like this: [OutputCache(Duration = 3600, Location = OutputCacheLocation.ServerAndClient, VaryByParam = "page;categor;searchString")] public virtual async Task Index(int? category, int page = 1, string…
kamal hamidi
  • 665
  • 1
  • 6
  • 16
4
votes
2 answers

Invalidate portions of the asp.net mvc output cache - with varying levels of granularity

I'm a little confused about the granularity offered by the HttpResponse.RemoveOutputCacheItem() call. I'm interested in performing some output caching on dynamically-generated images, and would like to vary the output cache using at least to…
DanP
  • 6,310
  • 4
  • 40
  • 68
4
votes
3 answers

Is it possible to iterate all the OutputCache keys?

Is it possible to iterate the OutputCache keys? I know you can remove them individually via HttpResponse.RemoveOutputCacheItem(), but is there a way I can iterate all the keys to see what's in the collection? I searched through Object Viewer, but…
Deane
  • 8,269
  • 12
  • 58
  • 108
4
votes
0 answers

Avoid donut caching when user is logged in as admin in Forms Authentication?

I would like to avoid caching if the user is logged in with forms authentication in the admin group. I have overridden the cache attribute and have applied it at the controller level. However, the method NonAdmin does not get called via the…
4
votes
1 answer

How to detect (with server-side code) whether an ASP.NET Page is about to be cached (the first time it is requested)?

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…
simich
  • 358
  • 3
  • 10
4
votes
2 answers

Output Cache Total Hits not being reflected in IIS performance monitor

We use output caching profiles in Web.Config like so:
Matt Beckman
  • 5,022
  • 4
  • 29
  • 42
4
votes
3 answers

Get output cache to work in ASP.net with webusercontrol

I have a webusercontrol with a public int property SelectedCatID. I use this control on other pages and in other controls as follows: How do I output cache this control…
Tom Gullen
  • 61,249
  • 84
  • 283
  • 456
4
votes
1 answer

VaryByParam fails if a param is a list

I've got this action in MVC [OutputCache(Duration = 1200, VaryByParam = "*")] public ActionResult FilterArea( string listType, List designersID, int currPage = 1 ) { // Code removed } that fails to present the correct HTML with url…
Sig. Tolleranza
  • 499
  • 9
  • 27
4
votes
1 answer

WebApi - Redis cache vs Output cache

I have been studying about Redis (no experience at all - just studied theory), and after doing some research, found out that its also being used as cache. e.g. StackOverfolow it self. My question is, if I have an asp.net WebApi service, and I use…
M. Ali Iftikhar
  • 3,125
  • 2
  • 26
  • 36
4
votes
1 answer

Is The Standard OutputCache Attribute Per User Or Per Application

If I add the following to my application/controller [OutputCache(Duration = 7200)] And I have two users on the site, User1 & User2. If User1 browses to a page with the above OutputCache turned on, the server caches the HTML in the page. If User2…
YodasMyDad
  • 9,248
  • 24
  • 76
  • 121