Dashboard Definition Caching

                 

 
Special Edition Using Microsoft SharePoint Portal Server
By Robert Ferguson

Table of Contents
Chapter 14.  Customizing Dashboards


Dashboard Definition Caching is a new feature that became available in Service Pack 1. It enables you to cache the list of all Web Parts and all sub-dashboards . If caching is enabled, the information, once gathered, will be applied to all users for requests made within the next two hours. When the cache time-out has been exceeded, the dashboard retrieves the list of Web Parts and sub-dashboards and caches the results for another two-hour period. The advantage is that any requests within the two- hour period can be resolved from cached results, which will drastically improve the performance.

This performance improvement does come with a couple of limitations, though, as the list of sub-dashboards and Web Parts is the same for all users:

  • All sub-dashboards and Web Parts are executed in the security context of the user who built the cache. Therefore, the security context should be the same for all sub-dashboards and Web Parts, because otherwise the dashboard may produce unexpected results. A consequence of this is that before you can enable the caching algorithms on the default dashboards, you must move the Management Dashboard to a Personal Dashboard. The Management Dashboard is only visible to Coordinators, and thus the link is only visible in their particular security context. More information on how to move a dashboard can be found in the next section.

  • The Minimize and Close buttons may appear on Web Parts, but these buttons will not function as expected. To avoid this, clear the following two check boxes for all Web Parts on your caching-enabled dashboard:

    "Allow users to remove this Web Part from their dashboard"

    "Allow users to minimize this Web Part on their dashboard"

  • None of the Web Parts should return an empty string or empty. The first will cause the Web Part's code to be displayed; the latter will cause the dashboard framework to disable caching.

Move the Management Sub-dashboard

As discussed in the previous paragraph, the Management sub-dashboard must be moved before you can enable dashboard definition caching on the default dashboard or one of its sub-dashboards. The Management sub-dashboard uses a different security configuration from the other sub-dashboards to allow only Coordinators to access it. Dashboard definition cashing requires the usage of the same security settings for all of the sub-dashboards, though, because the cache used by all users is built by the first user who accesses the dashboard.

The white paper that ships with Service Pack 1 in the Support\Documentation directory illustrates how the Management dashboard can be moved to a "Standalone" dashboard. This approach does require you to remember the URL of the Management dashboard, though. Personal dashboards, however, can be found through the Document Library. You may prefer this approach, even if it takes a little more effort to make the dashboard visible and to apply the correct security context. To move the Management sub-dashboard to a personal dashboard called Management, do the following:

  1. Log in as Workspace Coordinator on the server that hosts the workspace.

  2. Click Start, select Programs, select Accessories, and then click Command Prompt.

  3. Navigate to the SharePoint Portal Server\Bin directory, which by default is C:\Program Files\SharePoint Portal Server\Bin.

  4. Type cscript movedashboard.vbs "http: //server/workspace/ Portal/Management" "http: //server/workspace/ Dashboards/Management" and then press Enter.

  5. The Management dashboard is hidden; therefore you will not see it in the Dashboards folder of the Document Library. Using the following script, you can toggle the visibility:

     Const adModeReadWrite = 3  Const adFailIfNotExists = -1 If wscript.Arguments.Count < 1 or len(wscript.Arguments(0)) = 0 Then     wscript.Echo "ToggleHide <URL>" & vblf & " to toggle the visibility of <URL>"     wscript.Quit End If strURL = wscript.Arguments(0) Set conn = CreateObject("ADODB.Connection") Set record = CreateObject("ADODB.Record") 'open a connection & record conn.Open "Provider=MSDAIPP.DSO; Data Source=" & strURL record.open "", conn, adModeReadWrite, adFailIfNotExists 'Toggle the current value to set two properties that determine if the 'dashboard is shown in the portal ishidden = Not record.Fields("DAV:ishidden")  record.Fields("DAV:ishidden") = ishidden record.Fields("urn:schemas-microsoft-com:publishing:IsHiddenInPortal") = ishidden record.Fields.Update 'close and release the objects record.close : set record = nothing conn.close: set conn = nothing If isHidden = true Then    wscript.Echo "URL " & strURL & " is now hidden" Else    wscript.Echo "URL " & strURL & " is now visible" End If 
  6. By default, the moved Management dashboard inherits the security settings of the dashboard folder, which will cause the dashboard to be visible to everyone. To change this, open the workspace Web Folder and navigate to the Dashboards folder.

  7. Right-click the Management folder and select Properties.

  8. Select the Security Tab.

  9. Uncheck Use parent folder's security settings.

  10. Select the Everyone Reader row in the selection box.

  11. Click Remove.

  12. Click OK to close the Properties dialog.

  13. From your browser, open http://<server>/<workspace>/Dashboards/Management, and then click Flush application level cache.

Enable Dashboard Definition Caching

The digital dashboard definition caching is controlled via a property set on the digital dashboard folder. To enable or disable the dashboard caching, do the following:

  1. Log in as Workspace Coordinator to the server hosting the workspace.

  2. Click Start, select Programs, select Accessories, and then click Command Prompt.

  3. Navigate to the SharePoint Portal Server\Bin directory, which by default is C:\Program Files\SharePoint Portal Server\Bin.

  4. To Enable caching for the root digital dashboard, type

      cscript portalperf.vbs http://<server >/<workspace >/portal   dashboarddef enable  

    To enable caching for a sub-dashboard type

      cscript portalperf.vbs http://<server >/<workspace >/portal/<sub-dashboard> dashboarddef graphics/ccc.gif enable  

    To disable the dashboard definition caching, replace the word enable with disable in the previous command line.

  5. From your browser, open http://<server>/<workspace>/Dashboards/Management, and then click Flush application level cache.


                 
Top


Special Edition Using Microsoft SharePoint Portal Server
Special Edition Using Microsoft SharePoint Portal Server
ISBN: 0789725703
EAN: 2147483647
Year: 2002
Pages: 286

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net