WAS v8.5 > Administer applications and their environment > Welcome to administering Dynamic caching > Administer the dynamic cache service > Use the dynamic cache service

Configure portlet fragment caching with wsadmin

We can configure portlet fragment caching with scripting and wsadmin.

Before starting this task, wsadmin must be running. See the Starting the wsadmin scripting client topic for more information about starting wsadmin. If we use wsadmin to enable portlet fragment caching, verify servlet caching is also enabled. Similarly if we use wsadmin to disable portlet fragment caching, verify 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 dmgr console, synchronization is automatically taken care of for you.

  1. Locate the server object. The following example selects the first server found:

    Jacl:

      set s1 [$AdminConfig getid /Server:server1/]

    Jython:

  2. List the web containers and assign them to the wc variable, for example:

    Jacl:

      set wc [$AdminConfig list PortletContainer $s1]

    Jython:

  3. Set the enablePortletCaching attribute to true and assign it to the serEnable variable, for example:

    Jacl:

      set serEnable "{enablePortletCaching true}"

    Jython:

      serEnable = [['enablePortletCaching', 'true']]

  4. Enable caching, for example:

    Jacl:

      $AdminConfig modify $wc $serEnable

    Jython:


Related


Configure portlet fragment caching
Start the wsadmin scripting client using wsadmin.sh


+

Search Tips   |   Advanced Search