samedi 28 novembre 2015

dont cache layout with DonutOutputCache

I use DonutOutputCache for caching data .

In my view I want dont cache Layout , for do this ,I use bloew code:

@{
@Html.Action(MVC.INDEX.ActionNames.GetLayout, MVC.controller.Name, true);
   var layoutname=TempData["layout"].ToString();
   this.Layout = layoutname;
      }

but this block dont run each time . how can I do it ?

My Layout set daynamicaly.

Aucun commentaire:

Enregistrer un commentaire