I am creating a simple query by combining few criteria to get the page id .The code for the method is as below. The issue is while monitoring the performance of the website the method is taking long time for the first time but for the subsequent hits its taking negligible time. The result are as below 1 2 3 4 5 6 7 8 11388.322 5.548 7.426 4.099 11.376 4.17 3.938 4.813
All times are in ms and i have recycled the app pool for the first time, application caching is off but tridion object cache is on (though i believe creating query has nothing to do with tridion object cache, Please correct me if i am wrong)
public static Query GetPageContentFor(int publicationId, string pageUrl)
{
var pageUrlCriteria = new PageURLCriteria(pageUrl,Criteria.Equal);
var pubCriteria = new PublicationCriteria(publicationId);
var finalCriteria = new AndCriteria(pageUrlCriteria, pubCriteria);
return new Query(finalCriteria);
}
Regards, Rajendra