Comments (5)
Do you have a child action in a child action? https://mvcdonutcaching.codeplex.com/discussions/324905
from mvcdonutcaching.
Sorry that was an old issue. It's a setting. Just got it working :-) #13 (comment)
from mvcdonutcaching.
Not at all, @Html.Action("TopMenu", "Home", true)
is my _Layout.cshtml
and my TopMenuPartial.cshtml
is as the following:
@using Smartiz.Common
@using Smartiz.Security
@{
Layout = null;
}
<div class="navbar navbar-inverse">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="@ViewBag.WebsiteDomain">صفحه نخست</a></li>
@if (!Request.IsAuthenticated)
{
<li>@Html.ActionLink("ورود", "Login", "Account")</li>
<li>@Html.ActionLink("عضویت در سایت", "Register", "Account")</li>
}
else
{
<li>@Html.ActionLink(SecurityContext.CurrentUser.FullName, "UserSpecification", "Account")</li>
if (SecurityContext.CurrentUser.IsAdmin)
{
<li><a href="@StaticVariables.ControlPanelDomain" target="_blank">کنترل پنل</a></li>
}
<li>@Html.ActionLink("خروج", "LogOff", "Account")</li>
}
</ul>
<ul class="nav navbar-nav navbar-left">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="fa fa-rss"></span></a>
<ul class="dropdown-menu">
@if (ViewBag.SelectedSubject != null)
{
<li>
<a target="_blank" href="@Url.RouteUrl("ContentsRssBySubjectId", new {subjectId = ViewBag.SelectedSubject.Id})"
title="@string.Format("RSS اخبار برای موضوع {0}", ViewBag.SelectedSubject.Name)" data-name="rss-icon"><span class="fa fa-rss"></span>فید موضوع انتخاب شده</a>
</li>
}
else if (ViewBag.SelectedTag != null)
{
<li>
<a target="_blank" href="@Url.RouteUrl("ContentsRssByTag", new {tag = ViewBag.SelectedTag})"
title="@string.Format("RSS اخبار برای برچسب {0}", ViewBag.SelectedTag)" data-name="rss-icon"><span class="fa fa-rss"></span>فید برچسب انتخاب شده</a>
</li>
}
<li><a target="_blank" href="@Url.RouteUrl("DeviceRss")" title="RSS" data-name="rss-icon"><span class="fa fa-rss"></span> فید دستگاه ها</a></li>
<li><a target="_blank" href="@Url.RouteUrl("DevicesCompareRss")" title="RSS" data-name="rss-icon"><span class="fa fa-rss"></span> فید مقایسه ها</a></li>
<li><a target="_blank" href="@Url.RouteUrl("ContentsRss")" title="RSS" data-name="rss-icon"><span class="fa fa-rss"></span> فید محتویات</a></li>
</ul>
</li>
<li>@Html.ActionLink("تبلیغات", "Index", "Advertisement")</li>
<li>@Html.ActionLink("تماس با ما", "Index", "ContactUs")</li>
<li>@Html.ActionLink("درباره ما", "Index", "AboutUs")</li>
</ul>
</div>
</div>
from mvcdonutcaching.
I set the following setting:
protected void Application_Start()
{
...
DevTrends.MvcDonutCaching.OutputCache.DefaultOptions = DevTrends.MvcDonutCaching.OutputCacheOptions.ReplaceDonutsInChildActions;
...
}
But nothing change and my child action get cached again !!!
from mvcdonutcaching.
I found the problem,
I didn't use DonutOutputCache
attribute for output cache on actions, I used OutPutCache
instead.
I changed it to DonutOutputCache
, my problem solved.
Thanks
from mvcdonutcaching.
Related Issues (20)
- help,if custom RouteConfig,the 'area' parameter not work in asp.net mvc HOT 5
- Sometimes application cache throws System.Web.HttpException HOT 2
- Clear cache with return View doesn't work HOT 1
- FileResult getting corrupted
- Server crash on creating cache item
- Cache expiry policy
- Missing null check in KeyGenerator.cs HOT 2
- Not working with route attribute
- abstract controller class derived as regular controllers in two different areas hits same cache
- Filtering is not allowed. While implementing Donut Caching.
- getting "Object reference not set to an instance of an object" while generating a key HOT 1
- cache only non-authenticated pages HOT 2
- Serialization error when trying to pass model object to child action using action method extension of Donutcache HOT 1
- unnecessary Comments were adding HOT 2
- Order of route values shouldn't impact key built HOT 1
- Can i change input database of mvcdonutcaching?
- RemoveItems does not pass routeValues to build the key causing RemoveItems to fail
- Cache profile Server, but still different results on different browsers/machines
- Asp.net Core Support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mvcdonutcaching.