/// <summary> /// Return the result of the <paramref name="query" /> from the cache. If the query is not cached /// yet, the query is materialized and cached before being returned. /// </summary> /// <typeparam name="T">Generic type parameter.</typeparam> /// <param name="query">The query to cache in the QueryCacheManager.</param> /// <param name="tags"> /// A variable-length parameters list containing tags to expire cached /// entries. /// </param> /// <returns>The result of the query.</returns> public static T FromCache <T>(this QueryDeferred <T> query, params string[] tags) { return(query.FromCache(QueryCacheManager.DefaultCacheItemPolicy, tags)); }
/// <summary> /// Return the result of the <paramref name="query" /> from the cache. If the query is not cached /// yet, the query is materialized asynchronously and cached before being returned. /// </summary> /// <typeparam name="T">Generic type parameter.</typeparam> /// <param name="query">The query to cache in the QueryCacheManager.</param> /// <param name="tags"> /// A variable-length parameters list containing tags to expire cached /// entries. /// </param> /// <returns>The result of the query.</returns> public static T FromCache <T>(this QueryDeferred <T> query, params string[] tags) { return(query.FromCache(QueryCacheManager.DefaultMemoryCacheEntryOptions, tags)); }