Method Cache
Cache<T>(IQueryable<T>)
This method executes the query on cache first. If the cache contains the result of the query, it returns the result from the cache, otherwise, it executes the query on the configured datasource and loads the data into the cache and then returns the result to the user.
Declaration
public static IQueryable<T> Cache<T>(this IQueryable<T> source)
where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| IQueryable<T> | source | The specified data source. |
Returns
| Type | Description |
|---|---|
| IQueryable<T> | The result set of the query. |
Type Parameters
| Name | Description |
|---|---|
| T | The generic type of the collection. |