Html.CachedPartial - my favourite helper.
It can boots performance fast and easy.
From docs:
So you can specify to cache by member and/or by page and also specify additional view data to your partial view. However, if your view data is dynamic (meaning it could change per page request) the cached output will still be returned. This same principle applies if the model you are passing in is dynamic. Please be aware of this: if you have a different model or viewData for any page request, the result will be the cached result of the first execution.
We are using this helper before final testing, when active development phrase finished.
If you're using dynamic data input from let's say a model that is changing by requests per page you will end up by not receiving the effect you're after.
Umbraco Caching: @Html.CachedPartial
Hi,
Could you explain better the @Html.CachedPartial Umbraco helper and the pro / cons ( see user sessions, login, etc. )?
Thank you
Hi Biagio,
Html.CachedPartial - my favourite helper. It can boots performance fast and easy.
From docs: So you can specify to cache by member and/or by page and also specify additional view data to your partial view. However, if your view data is dynamic (meaning it could change per page request) the cached output will still be returned. This same principle applies if the model you are passing in is dynamic. Please be aware of this: if you have a different model or viewData for any page request, the result will be the cached result of the first execution.
We are using this helper before final testing, when active development phrase finished.
Thanks,
Alex
Are there some troubles with dynamic page or secured page? Some time ago, I had a big problem with OutputCache...some users see cached data of others!
Biagio, if you specify cacheByMember = true, application will show partial depends on current member.
Thanks, Alex
If you're using dynamic data input from let's say a model that is changing by requests per page you will end up by not receiving the effect you're after.
Unfortunately that is out of the box Html.CachePartial functionality. You may find out more about it at the bottom of this page: https://our.umbraco.org/documentation/Reference/Templating/Mvc/partial-views
I think that CachePartial is better to use where are not a lot variable data.
is working on a reply...