outputcache

ASP.Net Invalid Page Caching

一笑奈何 提交于 2019-12-08 08:04:12
问题 Since the database-driven content of my site's home page changes infrequently, I use ASP.Net output caching to keep the content around for 1 hour: <%@ OutputCache Duration="3600" VaryByParam="none" %> I have a simple HTML comment at the beginning and end of the .ASCX control that I can use to verify that the output is being cached properly (by using 'view source' from within a browser): <!-- Cached Area (Created at: 10:08:08 PM) Begin Cache --> ... <!-- End Cached Area --> The caching itself

Sitecore 8.1 output cache not clearing

我的梦境 提交于 2019-12-07 22:40:52
问题 we have CA and CD on different servers hosted in Azure Web Apps written using ASP.NET MVC. I've added below so that output cache gets cleared upon publish end. <event name="indexing:end:remote"> <handler type="Sitecore.ContentSearch.Maintenance.IndexDependentHtmlCacheManager, Sitecore.ContentSearch" method="Clear"/> </event> However, the output cache doesn't get cleared and website content doesn't get updated. Any configuration that I need to do on top of above? Thanks. 回答1: You probably are

Can I use OutputCache with file dependency in ASP.Net MVC?

自闭症网瘾萝莉.ら 提交于 2019-12-07 06:16:53
问题 I have a child action method. Can I use OutputCache with file dependency?I can see only SQLDependency property in System.Web.Mvc.OutputCacheAttribute . 回答1: Yes you can use outputcache with file dependency. Check the following link for more detail. http://msdn.microsoft.com/en-us/library/67z4z916.aspx OR http://www.c-sharpcorner.com/UploadFile/chinnasrihari/Asp-Net-mvc-framework-server-side-html-caching-techniques/ 来源: https://stackoverflow.com/questions/21306907/can-i-use-outputcache-with

mvc3 OutputCache RemoveOutputCacheItem RenderAction

非 Y 不嫁゛ 提交于 2019-12-07 02:20:01
问题 I did my research but haven't found any answers. I'm using Html.RenderAction in a masterpage ( to render page header with links specific to user permissions ). Action is decorated with OutputCache, returns partial control and gets cached as expected. When the event happens ( let's say permissions are changed ) I want to programmatically invalidate cached partial control. I'm trying to use RemoveOutputCacheItem method. It takes a path as a parameter. I'm trying to set the path to the action

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

烂漫一生 提交于 2019-12-07 01:40:47
问题 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 to go back to the server and get a 304 if they need them again - I want the browser cache to instantly give me the same item. I found an article which is almost

Invalidate the whole output cache in asp .net MVC 2

[亡魂溺海] 提交于 2019-12-06 14:48:36
How is it possible to invalidate the whole output cache in asp .net mvc 2? AFAIK this is not possible. You can only invalidate specific actions that might have been cached by decorating them with the [OutputCache] attribute. HttpResponse.RemoveOutputCacheItem(Url.Action("Index", "Products")); While I don't know if there is a way to do it in code, still recycling the worker process might invalidate the server cache. If this is true then you might even do it in code by having code to do the recycling. 来源: https://stackoverflow.com/questions/4782569/invalidate-the-whole-output-cache-in-asp-net

Sitecore 8.1 output cache not clearing

非 Y 不嫁゛ 提交于 2019-12-06 06:23:27
we have CA and CD on different servers hosted in Azure Web Apps written using ASP.NET MVC. I've added below so that output cache gets cleared upon publish end. <event name="indexing:end:remote"> <handler type="Sitecore.ContentSearch.Maintenance.IndexDependentHtmlCacheManager, Sitecore.ContentSearch" method="Clear"/> </event> However, the output cache doesn't get cleared and website content doesn't get updated. Any configuration that I need to do on top of above? Thanks. Jay S You probably are missing your scalability settings. Because these are different servers, your CD needs to know which

How can I view the contents of the ASP.NET OutputCache?

随声附和 提交于 2019-12-06 03:51:23
问题 Is there any way that I can list the pages which are currently stored in the OutputCache? Just a list of paths would do, but if there's a way to get more information about each item (expiry etc), then all the better. 回答1: As far as I remember Cache is a singleton and there is only one instance of it per app domain. OutputCache uses it too and it's nothing more than just a Response.Cache. So I think cached pages should be available through the Cache (Sorry, I can't check this at the moment).

Configure the MVC.NET OutputCache to return 304 Not Modified if an ActionResult hasn't changed

假如想象 提交于 2019-12-05 23:30:56
问题 Introduce the Problem We have successfully configured the browser cache to return a saved response if the server indicates 304 Not Modified . Here is the config: <caching> <outputCacheSettings> <outputCacheProfiles> <add name="TransparentClient" location="Client" duration="0" /> </outputCacheProfiles> </outputCacheSettings> </caching> The web.config is perfect and sets Cache-control:private, max-age=0 so that: The browser will cache responses, will always validate the cache, and will return

Stop EPiServer clearing output cache on publish

删除回忆录丶 提交于 2019-12-05 20:41:31
This isn't a question I've seen around, usually it's 'EPiServer isn't clearing the output cache'. I'm trying to achieve the opposite. Each time a page is published the entire cache is dropped and as the client publishes several times a day, this is frustrating. I'm using the [ContentOutputCache] attribute and tried to implement a httpCacheVaryByCustom rule with an accompanying scheduled task in EPiServer to invalidate the cache when we decide to i.e. bundle updates together and invalidate at a predetermined time. I've tested this rule and it works using: public override string