In case it might help figuring out the bug my query looks like something this:
query = query.Filter(a => a.NewsCategory.Match(currentBlock.CategoryFilter));
foreach (int categoryId in currentBlock.CategoryFilter)
query = query.OrFilter(a => a.NewsCategory.Match(categoryId));
List<NewsArticlePage> newsPages = query.FilterForVisitor()
When using GetContentResult(), a 60 second cache is added by default for non-editors and non-admins. However, just as you mentioned, this has a dependency to the master cache. When you see these inconsistencies, have you checked if the index is updated with the correct values? As a test, you could try using .GetContentResult(0)
I am experiencing som odd behaviour with the cached query results when using GetPagesResult() or GetContentResult(). Accoring to the documentation the cache search result when using GetContentResult() is linked to episerver master cache key meaning that when a page is published the cache should be reset and the query should give an updated result. This would seem it not working 100%.
It almost seems like the cache reset is not consistant. Sometimes publishing a page will reset the cache and sometimes it will not. It is very inconsistant. We do not use any custom caching and we do not use EPiServer Find caching method StaticallyCacheFor(X).
The search result is displayed in a block without any [ContentOutputCache] attribute set. The [ContentOutputCache] attribute is placed on the Index method of the page controller.
Any tips or similar experiences? I have tried both GetPagesResult() and GetContentResult() without noticing any difference in terms of caching.