This content is archived. See latest version here

Last updated: Apr 03 2014


Search request can be cached using a certain duration using the StaticallyCacheFor method which accepts a timespan. No cache key is required as that will be automatically generated from the search request.


The code below will either return a previously cached result or execute the query and cache the result for five minutes.

var result = client.Search<BlogPost>()

It is also possible to cache results with a dependency (System.Web.Caching.Dependency) using an overload to the StaticallyCacheFor method.

Do you have feedback on this documentation? Send an email to For development-related questions and discussions, refer to our Forums on