Home » Microsoft » 70-489 » Which methods should you use?
You have a custom Web Part that retrieves data across multiple task lists. Pages that contain the Web Part load slowly.
You need to ensure that pages load as quickly as possible.
Which methods should you use? (Each correct answer presents a complete solution. Choose all that apply)
A. CrosslistQueryCache.GetSiteData(SPContext.Current.Site, siteUrl)
B. CrosslistQueryCache.GetSiteData(SPContext.Current.Site)
C. Cache.Get(siteUrl)
D. SPList.Getltems(spQuery)
Correct Answer: AC
Explanation/Reference:
A.
CrossListQueryCache.GetSiteData method (SPSite) gets the cache data that is based on the CrossListQueryInfo specification.
CrossListQueryCache.GetSiteData Method (SPSite, String) gets the cache data from the specified site and from the specified webUrl.
C: Cache.Get Method
Retrieves the specified item from the Cache object.
http://msdn.microsoft.com/en-us/library/ms578951%28v=office.14%29.aspx
http://msdn.microsoft.com/en-us/library/ms519705%28v=office.14%29.aspx