SqlClient LastQueryResultsFromCache Property Nemiro.Data.dll
Is True, if the last query result was obtained from the cache.

Namespace: Nemiro.Data.Sql
Assembly: Nemiro.Data (in Nemiro.Data.dll) Version: 2.11.4.126 (2.11.4.126)
Syntax

public bool LastQueryResultsFromCache { get; }

Property Value

Type: Boolean
Examples

using (SqlClient client = new SqlClient())
{
  // query with cache
  client.CacheDuration = 1200;
  client.CommandText = "SELECT TOP 100 * FROM proxy";
  var table = client.GetTable();
  Console.WriteLine("1. From cache: {0}", client.LastQueryResultsFromCache);
  // re-execute the query 
  var table = client.GetTable();
  Console.WriteLine("2. From cache: {0}", client.LastQueryResultsFromCache);
}
See Also