Hi DW,
In v9.2.8
In frontend:
Fx.
@{
var pageService = Dynamicweb.Extensibility.ServiceLocator.Current.GetInstance<Dynamicweb.Content.IPageService>();
var page = pageService.GetPage(_thePageIdFromOuterScope_);
}
<div>@((string)page.Item["TheProperty"])</div>
The result might be:
<div>Hello!</div>
The issue:
If I re-save in /admin with a difference value. The page.Item["TheProperty"] is still "Hello!" at frontend.
The cache at PageService is not reset.
The workaround:
I have this code to call:
if (Dynamicweb.Context.Current.Request["clearcaches"] == "1") {
var pageService = Dynamicweb.Extensibility.ServiceLocator.Current.GetInstance<Dynamicweb.Content.IPageService>();
pageService.ClearCache();
}
Can the cache at PageService be reset every time, when saving a page in /admin?
Because it's not optimal for the end-user to append "&clearcaches=1" in the url just to reset the cache