Configure pre-rendering
Overview
Pre-rendered content can be viewed either through...
- IBM Web Content Manager application
- Standalone site accessed through a web server
Define pre-rendering options in the WCM WCMConfigService service
Enable pre-rendering for sites viewed using Web Content Manager
This option is used when you are accessing the pre-rendered site through Web Content Manager. This will increase performance as static content is accessed from the pre-rendered site, but dynamic content will still be rendered through Web Content Manager.To enable users to access the pre-rendered site through a Web Content Manager application, specify the connect.businesslogic.module.default.class property in the WCM WCMConfigService service using the IBM WAS administration console.
- Property name: connect.businesslogic.module.default.class
- Value: 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 Manager to generate a pre-rendered site, but are not using Web Content Manager to view the pre-rendered site. You will need to use a web server to view the pre-rendered site.Specify the connect.businesslogic.module.cacher.class property in the WCM WCMConfigService service using the WAS administration console.
- Property name: connect.businesslogic.module.cacher.class
- Value: com.aptrix.cacher.CacherModule
Specify the following properties to configure caching. Default values are listed, although you can tailor these values as needed. Unless you explicitly set a value for a property, the default value is used.
connect.moduleconfig.cacher.destdir
Value: ${USER_INSTALL_ROOT}/PortalServer/wcm/ilwwcm/cacher
Base directory under which each site cache will be created. There will be one subdirectory created for each site.
Important: 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
Value: ${USER_INSTALL_ROOT}/PortalServer/wcm/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
Value: 1
This is used to set the time, in seconds, between requesting a page while caching.
connect.moduleconfig.cacher.busydelay
Value: 5
This is used to set the time, in seconds, of the busy delay setting. Use if executing within the busy start to busy end period. Otherwise the delay setting is used.
connect.moduleconfig.cacher.busystart/connect.moduleconfig.cacher.busyend
Value: 9:00 am/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
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. Default.value.
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 temporary 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
Value: Anonymous.
This determines the user to be used to render the Web Content Manager 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
Value: 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 property if it is not blank. The context of cacherurl is used when generating a URL with 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 through a SRV=cacheSite request.
connect.moduleconfig.cacher.task.servletpath
Value: /connect
The path of the substituted connect servlet defined in the connect.moduleconfig.cacher.task.cacherurl property. This property can be left blank if the cacherurl context should be used unchanged.
connect.moduleconfig.cacher.defaultcontentname
Value: index.html
This sets the name of the default or home file used when accessing the pre-rendered site. This normally would be index.html.
connect.moduleconfig.cacher.task.siteareas
Value: LibraryA/SiteAreaA,LibraryB/SiteAreaB,SiteAreaC
The site areas within a Web Content Manager environment to cache are entered here, separated by commas. This property provides the option of specifying the library in addition to the site area. If the library is specified, the pre-renderer looks for the site area in that library. If no library is specified, the default library is used, as specified in the defaultLibrary property.
connect.moduleconfig.cacher.task.interval.recurrence
connect.moduleconfig.cacher.task.interval.startdelay
The CacherModule can be set to run after a recurring number of minutes.
recurrence:
Value: 10.
The recurring period in minutes for a recurring task.
startdelay:
Value: 1
The delay in minutes prior to starting the first recurring task.
connect.moduleconfig.cacher.task.scheduled.times
Value: 3:00 am
Alternately, the CacherModule can be set to run at certain times. Enter a series of absolute times, separated by commas.
Important: When specifying time values, be sure you conform to the format H:MM am|pm, including the use of the colon (:) character and the space. Incorrectly specified values prevent pre-rendering from functioning properly.
Pre-rendering resources
connect.moduleconfig.cacher.useTieredResourceFoldersValue: false
All resources, such as images and file resources, are stored under the following folder:
CACHER_DIR/LIBRARY/SITEAREA/resourcesBy default, each individual resource is saved under its own folder. For example, a resource with the ID of "7961d78049717f29bc57fee5670e9d7b" will be stored under this folder:
CACHER_DIR/LIBRARY/SITEAREA/resources/7961d78049717f29bc57fee5670e9d7bYou can change this behavior so that resources are stored under a tiered set of sub-folders based on the first two characters of the resource ID by changing the value of connect.moduleconfig.cacher.useTieredResourceFolders to true. For example, a resource with the ID of "7961d78049717f29bc57fee5670e9d7b" will be stored under this folder:
CACHER_DIR/LIBRARY/SITEAREA/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.
Parent
Configure a web content delivery environment
Previous
Set service configuration properties
December 14, 2011
May 4, 2011 4:25:31 PM Clarified that default values are used if no value set Apr 1, 2011 1:26:17 PM Submitted by Pete Kempf on Feb 23, 2012 12:28:47 PM
});