Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Christmas Tip: Update CacheTime settings for many modulesChristmas Tip: Update CacheTime settings for many modules
Previous
 
Next
New Post
12/23/2006 7:56 AM
 

It is again time to write something about the things I do with Dotnetnuke. What I write may be wrong so if you see something that is not correct please correct me...

After adding Text/HTML to your site on many tabs you may want to update the cache settings (default for Text/HTML is 1200 seconds) for those module instances. You can do that manually by going into the module settings of that module but if you have a lot of Tex/HTML instances you may want to use an SQL statement for that:

Before we can do anything we need to find out what the ModuleDefId is for Text/HTML. The ModuleDefId for Text/HTML is stored in the ModuleDefinitions table. In my case the ModuleDefId for Text/HTML is 102. Now that we know that we run a query to find out on what tabs a Text/HTML instance is installed:

select * from tabmodules
inner join Modules on TabModules.ModuleId = Modules.ModuleId
where moduledefid = '102'

A list is shown with tabs that contain an Text/HTML instance. For performance increase we want to set the CacheTime for all those Text/HTML instances to 1 day = 86400 seconds.

update tabmodules
set TabModules.CacheTime = '86400'
from TabModules inner join Modules on Modules.ModuleId = TabModules.ModuleId
where ModuleDefId = '102'

Next time you run the first query you will see that the CacheTime column has been updated with '86400'. All you need to do is restart the application because settings in the TabModules table are cached or you can flush the cache in the Host Settings.

Increasing the CacheTime setting for modules can improve performance of your site, especially for Text/HTML because in many cases that is static content that does not change a lot.

There is one other settings that is important for caching Modules. In the Host Settings (DNN 4.4.0) check under Performance the 'Module Caching Method'. If it is set to memory it will be handled in memory and the Workerprocess on IIS will consume more memory on your server. If your hosting company has set a limit on the amount of memory you are allowed to use you may want to set the Module Caching Method to 'disk'.

 
New Post
12/23/2006 12:19 PM
 

Hello,

 

For newby like me, would it be possible to explain what "CacheTime" is exactly please ???
Déclic Vidéo FX

 
New Post
12/23/2006 4:36 PM
 

CacheTime is the amount of time information from a module stays in the cache. If the information from a module like the Text/HTML module is retrieved from the cache response is most of the time a bit faster compared to when it is retrieved from the database in the case where CacheTime is set to '0' or the the CacheTime is expired. Setting a CacheTime for a Module reduces the number of calls to the database.

An example: If I set CacheTime to 86400 = 1 day for the Text/HTML module from the time it is called for the first it takes 1 day before another call to the database is made. Less calls to the database increases in most cases performance. This works very well for static content. In the case of a module that contains for example a query to a table in your database (Report Module) it is generally not a good idea to set CacheTime to a larger value then '0'. If you set a CacheTime larger than '0' for such a Module outdated information will be shown to the user.

Did this help?

 
New Post
12/25/2006 11:07 AM
 
Mariette Knap wrote

CacheTime is the amount of time information from a module stays in the cache. If the information from a module like the Text/HTML module is retrieved from the cache response is most of the time a bit faster compared to when it is retrieved from the database in the case where CacheTime is set to '0' or the the CacheTime is expired. Setting a CacheTime for a Module reduces the number of calls to the database.

An example: If I set CacheTime to 86400 = 1 day for the Text/HTML module from the time it is called for the first it takes 1 day before another call to the database is made. Less calls to the database increases in most cases performance. This works very well for static content. In the case of a module that contains for example a query to a table in your database (Report Module) it is generally not a good idea to set CacheTime to a larger value then '0'. If you set a CacheTime larger than '0' for such a Module outdated information will be shown to the user.

Did this help?

Wow !!! This is valuable help, for sure. It is VERY VERY clear, THANK YOU VERY much. I understood perfectly what it is, how to use it and enhancing my web ! Congratulations for such a help.

I am a complete newby with DNN, and it is not so easy to understand. I am trying to prepare a summary of what I learn as a beginner to start a DNN site, I will put it on my web, hoping that it will help other users. I have already prepared a small explanation for installing the HELP module (which is present in the adequate forum). I will compile later everythig on a webpage, I hope it will not interfere with the forum or anybody else. If it is the case, keep me informed. I will include your explanation Mariette, it is very clear.

DV FX

 
New Post
1/4/2007 8:05 AM
 

Mariette,

One additionnal question. The cache is on the server where I am hosted, or on each computer from where people access my website ??

DV FX

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Christmas Tip: Update CacheTime settings for many modulesChristmas Tip: Update CacheTime settings for many modules


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out