One of the simplest ways of caching
WCM content is using Pre-Rendering. Snap shot of the site will be taken
while pre-rendering. The site can be pre-rendered in WCM or any other
web server depending upon the requirement. The contents can be viewed
from WCM or web server. As the whole site is pre-rendered, the response
will be extremely fast. The cacher module is used to pre-render the
site.
Automatically running cacher module
The cacher module can be configured to run automatically by defining a property in WCMConfigService.properties file.
Manually running the cacher module
Cacher module can be run manually using the URL interface. Below is an example of the URL to cache a site.
Following are the possible values of SRV parameter.
A page in the site also can be pre-rendered using the URL interface. Below is an example of the URL to cache a specific page.
When SRV parameter is not specified in the URL, the page specified in the URL will be cached by the cacher module. Below is an example URL to delete a specific page from the pre-rendered site.
Limitations
There are some limitations of using pre-rendering technique like.
Automatically running cacher module
The cacher module can be configured to run automatically by defining a property in WCMConfigService.properties file.
connect.businesslogic.module.cacher.autoload=true
Manually running the cacher module
Cacher module can be run manually using the URL interface. Below is an example of the URL to cache a site.
http://<host_name>:<port_number>/wps/wcm/connect?MOD=Cacher&Site=siteName&SRV=siteToBeCached&library=library_name
Following are the possible values of SRV parameter.
Service
|
Required Parameters
|
Optional Parameters
|
SRV=siteToBeCached
The specified site will
be pre-rendered with a delay mentioned in DELAY parameter
|
SITE = siteName
Site name
|
DELAY
Delay in seconds
LIBRARY
Library name of the site.
If the library parameter is not mentioned, the default library specified in
the WCMConfigService.properties will be used.
|
SRV=flushSiteCache
The pre-rendered data for
site is deleted
|
SITE
Site name
|
LIBRARY
Library name of the site.
If the library parameter is not mentioned, the default library specified in
the WCMConfigService.properties will be used.
|
http://localhost:port/wps/wcm/connect/library_name/site_name/site_area_name/content?MOD=Cacher
When SRV parameter is not specified in the URL, the page specified in the URL will be cached by the cacher module. Below is an example URL to delete a specific page from the pre-rendered site.
http://localhost:port/wps/wcm/connect/library_name/site_name/site_area_name/content?MOD=Cacher&SRV=flushPageCache
Limitations
There are some limitations of using pre-rendering technique like.
- Pre-rendering can be implemented only when the content is rendered using Remote Rendering Portlet.
- Characters that are considered as invalid in file name (depending on the operating system of the pre-rendered site) can not be used in the name field of Site, Site Areas and Content items.
- The path of the content item (e.g. site/sitearea/content) can not exceed operating system’s maximum path length (255 characters for Windows and 1024 characters for Linux)
- JSP components can not be pre-rendered.
- Can not grant access for different users in a pre-rendered site. The access is granted for the entire site based on the following property defined in WCMConfigService.properties file.
connect.moduleconfig.cacher.rendereruser = username
No comments:
Post a Comment