+

Search Tips   |   Advanced Search


Configure pre-rendering

You can enable pre-rendering so that content can be viewed either through a IBM Lotus Web Content Management application or as a standalone site that is accessed through a Web server.


Enable pre-rendering for sites viewed using Web Content Management

This option is used when you are accessing the pre-rendered site through Web Content Management.

This will increase performance as static content is accessed from the pre-rendered site, but dynamic content will still be rendered through Web Content Management.

To enable users to access the pre-rendered site through a Web Content Management application, update WCMConfigService.properties and make the following changes: File location:

  1. Ensure that the following line is commented out:

    connect.businesslogic.module.default.class=com.aptrix.pluto.renderer.RendererModule
    

  2. Ensure that the following line is not commented out:

    connect.businesslogic.module.default.class=com.aptrix.cacher.CacherModule
    

You cannot use the local rendering portlet (Web Content Viewer) when pre-rendering is set as the default module.


Enable pre-rendering for standalone sites

This option is used when you are using Web Content Management to generate a pre-rendered site, but are not using Web Content Management to view the pre-rendered site. You will need to use a Web server to view the pre-rendered site. Ensure that the following line is not commented out in WCMConfigService.properties:

connect.businesslogic.module.cacher.class=com.aptrix.cacher.CacherModule
Ensure that the following property values are set.

connect.moduleconfig.cacher.destdir=${USER_INSTALL_ROOT}/ilwwcm/cacher

Base directory under which each site cache will be created. There will be one subdirectory created for each site.

If the prerenderer is run with the connect.moduleconfig.cacher.overwritecache property set to true, any files in the connect.moduleconfig.cacher.destdir path that were not written in the last run of the prerenderer will be deleted.

For this reason, ensure that the connect.moduleconfig.cacher.destdir path is only used for storing rendered content and that it does not contain any other data that cannot be recreated.

connect.moduleconfig.cacher.tempdir=${USER_INSTALL_ROOT}/ilwwcm/cacher/temp

The temporary directory that is required to build the site cache prior to moving the data over to the base directory specified by the connect.moduleconfig.cacher.destdir property.

connect.moduleconfig.cacher.delay=1

This is used to set the time, in seconds, between requesting a page while caching.

connect.moduleconfig.cacher.busydelay=5

This is used to set the time, in seconds, of the busy delay setting. This is used if executing within the busy start to busy end period. Otherwise the delay setting is used.

connect.moduleconfig.cacher.busystart=9:00 am

connect.moduleconfig.cacher.busyend=5:00 pm

These settings determine the times between which the busy delay setting will be used. Enter an absolute time as shown.

connect.moduleconfig.cacher.overwritecache=true

true

The prerenderer will overwrite files in the destdir cache directory (then delete unneeded files). This results in a progressive change in site content as seen by the user.

false

The first time a site is pre-rendered, the cached site files will be added to the destination directory. As changes are made to the site through the authoring portlet, the new version of the site will gradually be cached in the temp directory and the old site will remain in the destination directory. After the cacher has finished caching the site completely, the contents of the temporary directory are moved to the destination directory which will then contain both old and new versions of the cached site.

A value of false should not be used if a Web server is used to display the pre-rendered data because some Web servers lock the data directories.

connect.moduleconfig.cacher.rendereruser=Anonymous

This determines the user to be used to render the Web Content Management content. Either type Anonymous or Administrator or a specific user or group name.

The site is pre-rendered based on this user's security rights. If the user specified here does not have access to a particular component it will not be pre-rendered.

connect.moduleconfig.cacher.task.cacherurl=http://${WCM_HOST}:${WCM_PORT}/${WCM_CONTEXT_ROOT}/connect/

The full URL to be used as the replacement for the connect servlet in pre-rendered pages. The URL should end with the string specified in connect.moduleconfig.cacher.task.servletpath if it is not blank. The context of cacherurl is used when generating a URLvia pre-rendering. This property is not used when a page belongs to a site that has not already been pre-rendered at a site level by the scheduled task or via a SRV=cacheSite request.

connect.moduleconfig.cacher.task.servletpath=/connect

The path of the substituted connect servlet defined in connect.moduleconfig.cacher.task.cacherurl.

This property can be left blank if the cacherurl context should be used unchanged.

connect.moduleconfig.cacher.defaultcontentname=index.html

This sets the name of the default or home file of the site used when accessing the pre-rendered site. This normally would be index.html.

connect.moduleconfig.cacher.task.sites=[LibraryA/SiteA],[LibraryB/SiteB],[SiteC]

The sites within a Web Content Management environment to cache are entered here, separated by commas.

This property provides the option of specifying the library in addition to the site. If the library is specified, the pre-renderer looks for the site in that library. If no library is specified, the default library is used, as specified by the defaultLibrary property in WCMConfigService.properties.

connect.moduleconfig.cacher.task.interval.recurrence=10

connect.moduleconfig.cacher.task.interval.startdelay=1

The CacherModule can be set to run after a recurring number of minutes.

Recurrence:

The recurring period in minutes for a recurring task.

StartDelay:

The delay in minutes prior to starting the first recurring task.

connect.moduleconfig.cacher.task.scheduled.times=3:00 am

Alternately, the CacherModule can be set to run at certain times. Enter a series of absolute times, separated by commas.


Pre-rendering resources

connect.moduleconfig.cacher.useTieredResourceFolders=true

All resources, such as images and file resources, are stored under the following folder:

[CACHER_DIR]\[LIBRARY]\[SITE]\resources
By default, resources are stored under a tiered set of sub-folders based the first two characters of the resource id.

For example, a resource with the ID of "7961d78049717f29bc57fee5670e9d7b" will be stored under this folder:

[CACHER_DIR]\[LIBRARY]\[SITE]\resources\7\9\
All other resources that whose IDs begin with "79" will also be stored under this folder. This is done to reduce the number of sub-folders under the "resources" folders.

You can change this behavior so that each individual resource is saved under its own folder by changing "connect.moduleconfig.cacher.useTieredResourceFolders" to false. When set to false, a resource with the ID of "7961d78049717f29bc57fee5670e9d7b" will be stored under this folder:

[CACHER_DIR]\[LIBRARY]\[SITE]\resources\7961d78049717f29bc57fee5670e9d7b


Parent topic:

Configure a Web content delivery environment