Questions tagged [outputcache]

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

680 questions
0
votes
2 answers

Outputcache 1 action, 2 views

So I have the following action which I am trying to add output caching to: [OutputCache(CacheProfile = OutputCacheProfileNames.Hours24)] public ActionResult ContactUs() { ContactUsModel model = _modelBuilder.BuildContactUsModel(); if…
Pete
  • 57,112
  • 28
  • 117
  • 166
0
votes
1 answer

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…
TimLeung
  • 3,459
  • 6
  • 42
  • 59
0
votes
1 answer

OutputCache attribute on a controller

I have a ASP.NET MVC 4 controller that looks like this: #if !DEBUG [OutputCache] #endif public class LearningController : Controller { public ActionResult Index() { return View(); } public…
automaton
  • 1,972
  • 5
  • 25
  • 40
0
votes
1 answer

How HTTP caching works in asp mvc 4

I have a controller which returns SVG images.As I wanted to have good performances, I decide to use Caching. From what I read on the web,once you set the last modified date with HttpContext.Response.Cache.SetLastModified(date) you can request it…
0
votes
1 answer

Anonymous users are unable to access DependencyHandler.axd with forms authentication and outpucache

anonymous users are unable to access DependencyHandler.axd with forms authentication and outpucache. Enable forms authentication
0
votes
1 answer

Remove ChildAction from OutPutCache in MVC 5?

I'm developing a website with MVC 5.2.3, it has a top menu bar in _Layout.cshtml that contains logged in user information. Like user's FullName, so it shouldn't be cache. For exclude this menu from OutPutCache, I created a child action for…
Mohammad Dayyan
  • 21,578
  • 41
  • 164
  • 232
0
votes
1 answer

Problematically Invalidate the IIS Output Cache

My content is generally pre-rendered data that is derived from a database. All the pages load once and are cached. If the data in the database changes, the cache should be invalidated for certain pages. Is there a way to reset the IIS Output Cache…
Mark Johnson
  • 159
  • 1
  • 7
0
votes
1 answer

MVCSiteMapProvider: Using security trimming with ouput cache returns empty sitemap

I am using the MvcSiteMapProvider Html Helper to create a navbar. The content of the navbar depends on the visitor rights therefore I am using security trimming to only display content which the person is authorized for. For performance improvement…
0
votes
2 answers

Outputcaching not working with cookies

There was a weird issue yesterday about asp.net's outputcaching (webforms). We were using page-level caching (not partial caching) for a multi-lingual site (language is determined via querystring key) and for some purpose, caching stopped working…
Oğuzhan Kahyaoğlu
  • 1,727
  • 2
  • 15
  • 20
0
votes
1 answer

OutputCache for dynamic pages with state

I have an ASPX page that makes a lot of database queries that I am trying to cache to improve performance of the application. The page can be one of three states: Waiting for dynamic data. Displaying dynamic data. Done displaying dynamic data. The…
sohum
  • 3,207
  • 2
  • 39
  • 63
0
votes
1 answer

Restricting a cached MVC action to Request.IsLocal?

I have an MVC action with an OutputCache as I need the data to be cached to minimize calls to myService. [HttpGet] [OutputCache(Duration = 86400, Location = OutputCacheLocation.ServerAndClient, VaryByParam = "myVariable")] public JsonResult…
mejobloggs
  • 7,937
  • 6
  • 32
  • 39
0
votes
0 answers

How to get list of Output Cached Objects in asp.net mvc?

I'm trying to get list of cached objects in my application. In this page MSDN - Cache Class it says that I can use getEnumerator() function of the cache class to get list of cached objects. but when I use it, it only returns a Dictionary of cached…
mesut
  • 2,099
  • 3
  • 23
  • 35
0
votes
0 answers

Does OutputCache cache an ActionFilter's properties?

I'm using donut output caching on a certain action, which uses this action filter: public sealed class DoStuffAttribute : ActionFilterAttribute { private bool HasRun = false; public override void OnActionExecuting(ActionExecutingContext…
h bob
  • 3,610
  • 3
  • 35
  • 51
0
votes
1 answer

kernel mode caching for MVC in IIS

I know we can enable kernel mode caching for asp.net applications using ".aspx". But how can we do with MVC application?. MVC application doesn't have any extensions for files.
James123
  • 11,184
  • 66
  • 189
  • 343
0
votes
2 answers

OutputCache and injected ActionParameters

We use a ActionFilterAttribute to inject some parameters into actions and it works great. But when we add OutputCache it varies exclusively on "MyID" when Html.RenderAction() is used and not when surfing directly to the action. Any ideas how to get…
Johan Olsson
  • 715
  • 11
  • 22