Hi ,
I would like to understand how IdeaBlade caching works if we apply different order by criterion on same query.
As per my understanding , once Ideablade retrieves any entities, it keeps them in cache and going forward if we query for the same entities again it uses cache instead of hitting the database again if QueryStrategy is QueryStrategy.Normal.
Would u plz. let me know what will be behavior of IdeaBlade if we fire below queries in given order ?
1. MyEntityManager.Instance.Zips.Where<Zip> ( p => p.State.StartsWith ( "CA" ) ) --- > Load the data from database
2. MyEntityManager.Instance.Zips.Where<Zip>(p => p.State.StartsWith("CA")) -- > Load the data from database or use Cache ???
.OrderBy(p => p.City )
.ThenBy ( p => p.Code );
3. MyEntityManager.Instance.Zips.Where<Zip> ( p => p.State.StartsWith ( "CA" ) ) -- > Load the data from database or use Cache ???
.OrderBy ( p => p.Code )
.ThenBy ( p => p.City );
After executing first query above , we have all zip entities for CA state in cache. What would happen if we execute
query 2 and 3 above ? Will it hit the database or sort the data already in cache and return the results ?
- Jignesh Suthar