Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Is it possible to Cache Grid blocks or even Cache HTML.GetGridHTML?
I have a block on a template which I need to cache.
Jon
Hi, Yes - just create a partial that takes your model and does the grid call then you can just use the cached partial call in your template:
So change your call for the Get Grid to:
@Html.CachedPartial("Grid/CacheForGrid", Model, 3600, true, false)
Then create a partial called CacheForGrid
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage @Html.GetGridHtml(Model.Content, "GridContent", "mycustomrenderer")
That was from a v7 project but hopefully you get the idea.
Steve
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Caching Grid Blocks
Hi,
Is it possible to Cache Grid blocks or even Cache HTML.GetGridHTML?
I have a block on a template which I need to cache.
Jon
Hi, Yes - just create a partial that takes your model and does the grid call then you can just use the cached partial call in your template:
So change your call for the Get Grid to:
Then create a partial called CacheForGrid
That was from a v7 project but hopefully you get the idea.
Steve
is working on a reply...