Failures with .StaticallyCacheFor() when used with .FilterForVisitor()

  • Updated

In versions prior to Episerver.Find 13.1.0(not yet released), using .StaticallyCacheFor() with .FilterForVisitor() could cause find result caching to fail. 

As a workaround to this issue, replace FilterForVisitor() with the three filters it applies behind the scenes and make sure the date time value is only updated to match cache duration.

In other words, replace FilterForVisitor() with the following Filters
PublishedInCurrentLanguage(datetime changing only every X minutes goes here)


Common Caching Pitfalls 

More on Find caching