Is there anyway to get a notification when the find index has been updated. Something similar to the PublishedContent event?
Best regards 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?
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 ?
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: http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/8/Integration/EPiServer-75/GetContentResult-and-GetFilesResult/. 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:
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.