I did my research but I have not received any answers.
I am using HTML. ResenderAction is punished with an output cache, in partial control and cached as expected, in a masterpage (to render page headers with specific links for user permission).
When the event happens (assuming the permissions change) I want to cancel the program cached partial control.
I'm trying to use the RemoveOutputCacheItem method. It takes a path as the parameter I am trying to determine the path of the action used in HTML. ResendAction
Thanks
The problem is that the cache property is stored in the child's work That API does not have an ID for child work and the storage in this object is not public (why Microsoft ??) So if you try to loop through objects in this collection, then you will know that your child's action The cached value will also include, but you You will not be able to recognize unless you do not reverse the engineer which is to generate the key that uses the algorithm (such as being seen with reflection):
Internal String GetChildActionUniqueId (Action Closet Filter Filter) {StringBuilder builder = new StringBuilder (); Builder.Append ("_MvcChildActionCache_"); Builder.Append (filterContext.ActionDescriptor.UniqueId); Builder. Append (descriptorushracerecredit universal id (new object [] {this.VaryByCustom})); If (! String.IsNullOrEmpty (this.VaryByCustom)) {string different BeCustomString = filterContext.HttpContext.ApplicationInstance.GetVaryByCustomString (HttpContext.Current, this.VaryByCustom); Builder.Append (varyByCustomString); } Builder. Append (GetUniqueIdFromActionParameters (FilterContact, SplitVirByParam)); Use (SHA256 sha = SHA256.Create ()) {Return Convert. ToBase64String (sha.ComputeHash (encoding.UTF8.GetBytes (Builder.ToString ()))); }} Then you can do the following dementia:
Public operation denied () {output key. Specialty. Childactioncash = new memorycat ("new default"); See Return (); } Who will obviously cancel the actions of all caught children who are probably looking for you, but I'm afraid that the course Unlike reverse engineering key generation: -). @Microsoft, please, I beg you for ASP.Net MVC 4.0:
- In addition to this, donut hole caching is introduced to the possibility of donting counts.
- The introduction of the possibility of easy ending of the cached control action (MVCish something more than
Response.RemoveOutputCacheItem ) -
- If you do 1. Let's clearly introduce the possibility of terminating the cached donut part.
Comments
Post a Comment