Perfomance is a key requirement for every application, and so does it is for DotNetNuke web applications also. DotNetnuke uses data caching as an inbuilt approach and provides a provider for cache also. It always adds good perfomance gain by setting the proper cache value and cache policy to you dotnetnuke web application. But there are times when you need to clear the cache of the application. If you are a host or admin and you want to manage it from the from end, you can go to :
Host - Host Settings - Advance Settings - Perfomance Settings
You can find a clear cache button there which will help you clearing cache. But there are times when this is not logical. For intance if you are allowing a user to choose a new skin from the list, when user clicks and applies a new skin, at that time you have to clear the cache manually, otherwise changes will not reflect properly.
DotNetNuke.Common.Utilities.DataCache is a class which will help you clearing cache at various occations like I discussed above. In our scenerio, we have to clear portal cache and we can do that by calling
DotNetNuke.Common.Utilities.DataCache.ClearPortalCache(PortalId, false);
And its as simple as that. There are lots of other functions to clear cache starting from clear, like ClearModuleCache or ClearModulePermissionCache. You can use them as and when required.
Hope that helps
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Hi all, Creating a modal popup for asp.net users is always easy, its simply a modal panel, modal popup extender of asp.net ajax and all is ...
-
// using DotNetNuke.Entities.Portals; // using System.Collections; PortalAliasController paController = new PortalAliasController(); PortalA...
-
I was configuring one of our clients farm which required FBA on different web applications (around 5) and he wanted each web application sho...
No comments:
Post a Comment
Please add your valuable comments about this post if it helped you. Thanks