Web Part Caching

Girijesh Kumar asked on April 24, 2014 01:40

Hi,

I have a user control and write some query to fetch data from data base on CS code. actually this user control used for showing banner on home page dynamic. Now i registered this user control on home page template inside user control web part. Problem is that my query executed many times that's why my home page take more and more time to load. Can i put this user control web part in cache ? If Yes how. OR any suggestion for fast processing .Please help me

Thanks,

Girijesh

Correct Answer

Brenden Kehren answered on April 25, 2014 07:55

You can optionally set the cache level for the whole site in CMSSite Manager>Settings or you can set it on the User Control webpart you've placed on the page in the Performance section. By setting the cache minutes to something more than 0 and blank you will override the default site settings.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Girijesh Kumar answered on April 28, 2014 01:14 (last edited on April 28, 2014 01:14)

Hi Brenden,

Thank you so much for you quick reply.

I have set cache 60 minute for my user control web part.

now how i know that my user control is cached or not.

I have try to see in Site Manager -> System -> Debug -> Cache Item. but i dint find anything related to my banner user control.

Image Text

Thanks,

Girijesh

0 votesVote for this answer Mark as a Correct answer

David Komárek answered on June 13, 2014 05:07

If you want to see the cached items, I would recommend turning on the Site manager -> Settings -> System -> Debug -> All -> Debug everything everywhere option.

Now, if you go to the Live site, to the page where you control is located, if you scroll to the bottom, there will be all debug information. You will be interested in the Caching section (usually is the second, right after the SQL section), where you can find an item Partial cache (YourWebpartID).

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.