What Is The Importance of Caching Webparts in SharePoint?

I have created a few custom webparts that retrieves list and user profile information.

The number of records I am outputting into my webpart could be in thier thousands. Is there a particular need for me to cache these results?

If I don't use caching will this create a massive performance hit or does SharePoint take care of this to a certain extent for me?
R1ND3RAsked:
Who is Participating?
 
ImaCircularSawTechnical LeadCommented:
Depending on how you've coded the webpart, each time the page is requested the list will be collated.  This will of course require resources to do and should the hardware available not be up to the job you'll suffer with performance lagging.

I would recommend that as part of performance testing your webpart or should you notice slowdown you could implement caching of the webpart.  You might want to also consider how up-to-date you require the information in the webpart to be.  As your farm grows and resources are required elsewhere and if appropriate you could cache the webpart to free up resources for other parts of your farm.

It's hard to give an answer specific to your situation without knowing and performance figures but I hope this helps.
0
 
R1ND3RAuthor Commented:
Thanks for your reply.

I will carry out some performance tests to measure speed. But I think I will just cache my webparts to be on the safe side since the number of records returned is bound to grow over time.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.