SaaS CMS has officially launched! Learn more now.

Notification on index update



Is there anyway to get a notification when the find index has been updated. Something similar to the PublishedContent event?

Best regards Niklas

Feb 17, 2017 14:42

Hi Niklas

Why do you need to know if the index has been updated? You can hook into the PublishedContent event for content and if you are custom indexing things yourself you can raise an event there? 


Feb 17, 2017 15:55

Hi David,

If a cache is built with Find index as data source i imagine that the cache will need to be invalidated when the index is updated.

I cant see how PublishedContent will help with the invalidation. When PublishedContent is firing the Index isn´t updated yet. Right ?

Regards Niklas

Edited, Feb 17, 2017 16:41

If you are using the default Find implementation the index should be updated automatically whenever you publish content (it uses PublishedContent under the hood).

If you are using GetContentResult() then the Find takes care of the caching for you as explained here: If you are caching anything that depends on content then use the Episerver Cache manager and put a dependency on the master cache key. This will invalidate the cache as soon as any content changes on the site and also will invalidate across all running instances of the same site. 

EMVP Daniel Ovaska is a big caching fan and has written a number of great posts on caching in Episerver, for example:


Feb 17, 2017 16:54

Thanks David.

I am doing some performance testing and I got confused. It turned out I was doing this on every test setup: "var findClient = Client.CreateFromConfig();". Which of course resets the built in cache you are talking about.

Regards Niklas

Feb 20, 2017 11:23
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.