You can configure portlet fragment caching with scripting and the wsadmin tool.
Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
If you use the wsadmin tool to enable portlet fragment caching, make sure that servlet caching is also enabled. Similarly if you use the wsadmin tool to disable portlet fragment caching, make sure that servlet caching is also disabled. The settings for these two caching functions must stay synchronized. If you enable or disable portlet fragment caching using the administrative console, synchronization is automatically taken care of for you.
Using Jacl:
set s1 [$AdminConfig getid /Server:server1/]
Using Jython:
s1 = AdminConfig.getid('/Server:server1/')
Using Jacl:
set wc [$AdminConfig list PortletContainer $s1]
Using Jython:
wc = AdminConfig.list('PortletContainer', s1)
Using Jacl:
set serEnable "{enablePortletCaching true}"
Using Jython:
serEnable = [['enablePortletCaching', 'true']]
Using Jacl:
$AdminConfig modify $wc $serEnable
Using Jython:
AdminConfig.modify(wc, serEnable)