0

The speed of retrieval of data on my site is very slow because it loads more than about 10 tabs at the same time. So, I want to implement caching in it. But, I don't know how to implement caching?

Edit: There are some controls that have the same data. But whenever they page load they are called. I want them to caching for these controls. How can we update the cache when the data in the database is changed or altered?

4
  • This is very general, please clarify what type of cache, in browser, on reading the data, on the full page cache, on one control only cache ? Where is the big time that your page spend ? maybe is too big page ? Commented May 28, 2012 at 10:51
  • @Aristos edited the question. Please re check. Commented May 28, 2012 at 10:56
  • 1
    @coder311 read this article msdn.microsoft.com/en-us/library/aa478965.aspx You can set cache to this controls only. Commented May 28, 2012 at 10:58
  • @Aristos I'll update the question with more information soon. Commented May 28, 2012 at 12:45

2 Answers 2

2

If by tabs, you are referring to tabbed web content, you may find it useful to use AJAX to load the content on the tabs.

jQuery Tabs is a great way of doing this:

<div id="example">
     <ul>
         <li><a href="ahah_1.html"><span>Content 1</span></a></li>
         <li><a href="ahah_2.html"><span>Content 2</span></a></li>
         <li><a href="ahah_3.html"><span>Content 3</span></a></li>
     </ul>
</div>

$('#example').tabs();

This means that only the first tabbed content is loaded, and then the rest are loaded when clicked on/requested.

Sign up to request clarification or add additional context in comments.

Comments

1

There are several options out there:

  1. System.Runtime.Caching ( Documentation: http://msdn.microsoft.com/de-de/library/system.runtime.caching.aspx, Example: http://msdn.microsoft.com/de-de/library/system.runtime.caching.memorycache.aspx )
  2. AppFabric caching ( An article about AppFabric caching: http://msdn.microsoft.com/de-de/magazine/ff714581.aspx#MtViewDropDownText )
  3. Enterprise Library Caching application block ( http://msdn.microsoft.com/en-us/library/ff649093.aspx )

The first is included in the .NET framework, the second and third option are for some more specific cases.

When thinking about caching, remind yourself, if the cache gets too large, it will eventually be even as slow as direct data access.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.