Quick Nav:  Online Store   |   Login | Register

Understanding Caching and Parameters

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
Rodney
<100 Posts
Posts:60


04/15/2008 9:08 PM  

Firstly: when I added PB, the default option for Page Parameters was blank, but yet I saw some examples with “tabid” in it – what should it be at Portal Level? I also noticed “Firefox” as the Additional Cache Key – what does this do and should I have it in at portal level?


Secondly, I have a lot of dynamic content and want to make sure I am making optimum use of PB – for example, my user profile system (http://www.pokerdiy.com/Players/FamousPokerPlayerProfiles/tabid/554/Default.aspx) uses the same tab with a different ID:
e.g.
http://www.pokerdiy.com/Home/PokerPlayerProfile/tabid/391/ID/1/Default.aspx
http://www.pokerdiy.com/Home/PokerPlayerProfile/tabid/391/ID/10777/Default.aspx

So, from my understanding:
If I enable caching at Portal Level, with the TabID param, tab 391 will be cached. But because I have 1000’s of different users, I need to add a PB module on Tab 391 and add another variable (ID) so that each user is cached separately. Is that correct? I need to do the same thing for Groups/Events/Leagues etc. Also – assuming I have a lot of diskspace, I can jack up the max limit of disk pages to 5000 or something so that a lot more pages are cached to disk (100 is quite conservative, and I should not imagine each page is more than 200k or so, and I have 100 gig on my server). I can then cache them for 10 days or so for maximum effect.

John Mitchell
Posts:2750


04/15/2008 9:47 PM  

The default option for Page Parameter should be populated from the global config file which by default is page-param="tabid"

In DNN you should always use at least tabid for the Page Parameter, but if you don't each and every Url will still be cached seperately, they'll just all be in one folder on the disk.

The page parameter is used to create a folder where all the different instances of cached pages (based on the entire url) are kept for that page.

When the cache is invalidated with a post-back or a manual hard refresh all the cache files for that folder will be deleted which will in turn remove those instances from memory.

So, for pages that have modules that create multiple pages themselves it is a good idea to add extra page parameters like forumid, or threadid, or articleid.

That will make PageBlaster narrow down what is considered a "page" so that a post-back on one forum thread doesn't clear the entire forum cache.

The Page Parameters for a page with forums on it may look like this:  tabid;forumid;threadid

This will not make more cached pages, it will just organize them differently so that a "page" that gets cleared does not clear all instances on the tab.

It would probably be a good idea to ad the ID param to the page that has the player profiles since the profiles are probably fairly static once updated and you could then avoid clearing out all the profiles everytime one is updated.

The Additonal Cache Key is for parameters that are not on the Url that you would like to use so that the pages are even more uniquly identified.  The one you are seeing is actually [ PB:Request.Browser.Browser ] and is added to make sure that different browsers are cached uniquely (mainly because the DNN Menu has different output for different browsers and will not work in FirFox if IE caches it first).

Using the additional cache key will create more cached pages than normally would be created with just the Url. 

Cached pages are generally only about 10K to 20K each because they are also compressed before caching them.  The cool part about this is not only less disk space, but also less space in memory, and the best thing is that now the page does not have to be compressed over and over again on every request.  Build it once, do optimizations and replacements, then save it in cache to return directly on the next 1000's of requests.

For disk caching, I would recommend even longer than 10 days if you have the space to cache more (I cache mine for 99 days)  unless you have something that is getting updated in a way that does not invalidate the cache.

Rodney
<100 Posts
Posts:60


04/15/2008 10:46 PM  
Thanks for the explanation - for some reason my defaults are not getting pulled through, so I changed "Firefox" to [ PB:Request.Browser.Browser ] and added tabID too.

I selected 10 days because some of my pages do not have any postbacks on them and will not be invalidated, but they pull info from a variety of sources so they need to be updated every now and again. I'll see how it goes - I THINK I am noticing a significant decrease in the SQL process size (was running at 900k and now at 500k) so hopefully this is due to PB...
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >PageBlaster > Understanding Caching and Parameters



ActiveForums 3.7
Powered by: Snapsis Software