Improving performance of SharePoint solutions by using Cache and CacheDependency

Recently I noticed that the customers ask for more control about the custom SharePoint solutions we deliver. They not only want to be able to customize general SharePoint settings which determine the working of the solution but they want to be able to configure various custom controls as well. Storing custom settings in a list provides the power users a nice interface, yet retrieving these values for each single request is very likely to decrease the overall performance. Is it then a battle between customizable and well performing or is there more to it?

Developing well performing Web Content Management solutions is much easier than for example collaboration solutions. Because most visitors are anonymous you can store once rendered page in a cache and then serve the cached version for each subsequent request. You can achieve all that using the standard SharePoint functionality. In certain situations you want to provide the end users with some more flexibility or ability to customize their solution. Because you want to keep it all user friendly you want to reflect the changes immediately. Making your users waiting an hour for a refresh seems so 80’s…

Building a customized version of the page on each request is very resource demanding. It just takes a lot more time to walk through all the controls, gather all the settings, get back to the controls and finish rendering them. Does it mean you should discourage your customers from asking for some extra customizability?

Luckily not. Vincent Rothwell (also known as the kid) has just recently posted a great article about benefitting of the ASP.NET Cache and CacheDependency classes inside SharePoint. I really like the idea and I can’t wait to try it out. Definitely a must read for every SharePoint developer out there.

Technorati Tags: SharePoint, SharePoint 2007, MOSS 2007, Cache, Performance


comments powered by Disqus