Git Product home page Git Product logo

Comments (5)

jbreuer avatar jbreuer commented on June 8, 2024

Do you have a child action in a child action? https://mvcdonutcaching.codeplex.com/discussions/324905

from mvcdonutcaching.

jbreuer avatar jbreuer commented on June 8, 2024

Sorry that was an old issue. It's a setting. Just got it working :-) #13 (comment)

from mvcdonutcaching.

Mds92 avatar Mds92 commented on June 8, 2024

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.

Mds92 avatar Mds92 commented on June 8, 2024

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.

Mds92 avatar Mds92 commented on June 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.