Search code examples
sitecoresitecore8glass-mappersitecore-mvc

Glass Mapper Caching Value?


Using Sitecore 8.0u3 and Glass-Mapper 3.5.3

I've run into an interesting situation that I can't resolve. I'm seeing on certain controller renderings that some values for simple text fields(single-line, multiline) appear to be cached. Other controller renderings do not appear to have this issue.

I attempt to write out the intro text for the form like so:

<div class="intro">@Editable(m => Model.ContextItem.Intro_Text)</div>
<div>RAW: @Model.ContextItem.Intro_Text</div>

Note that the second line was added by me for troubleshooting purposes.

In this case, the result of this is:

Fill out the form to contact uss.

RAW: Fill out the form to contact uss.

I update the text in Sitecore to remove the extra 's', save and publish. I refresh my page and I see this:

Fill out the form to contact uss.

RAW: Fill out the form to contact us.

So the portion that does not use Editable works fine, but the Editable version continues to show the 'old' value.

I've looked at a lot of settings including the cacheability of the rendering, the cacheability of the site, the Caching.Enabled setting, the Caching.HTMLLifetime setting, IIS caching, publishing restrictions, but none seem to affect this issue.

Any ideas of other places to look for the source of the issue?


Solution

  • I think you need to use the syntax <div class="intro">@Editable(m => m.ContextItem.Intro_Text)</div> rather than <div class="intro">@Editable(m => Model.ContextItem.Intro_Text)</div>