Skip to main content link. Accesskey S
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • WebSphere Portal Family wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search

Categories

Tag Cloud

  • 6.0
  • 6.1
  • 6.1.0.1
  • 6.1.5
  • 7.0
  • 7.0.0.2
  • 8.0
  • actions
  • ActiveInsight
  • administrator
  • authoring
  • Banking template
  • best practices
  • blogs
  • builder
  • building a site
  • caching
  • catalog
  • Clickstream Engine
  • clusters
  • ConfigEngine tasks
  • content
  • customizing
  • databases
  • demo
  • deployment
  • deployment scenario
  • developer
  • developing
  • device class
  • elements
  • examples
  • Express
  • feature set
  • fix pack 2
  • Government to Business template
  • info center
  • information center
  • installation
  • installing
  • LDAP
  • Learning
  • libraries
  • LikeMinds Recommendation Engines
  • logging
  • mentors
  • message catalog
  • messages
  • migration
  • mobile
  • mobile devices
  • mobile experience
  • mobile experience 8.0
  • mobile theme
  • mobile webkit
  • MPA
  • multiplatform
  • pages
  • performance
  • personalization
  • planning
  • portal
  • Portal 6.1
  • portlets
  • product doc
  • product documentation
  • projects
  • properties
  • Redbooks
  • Redbooks Wiki
  • remember me cookie
  • resources
  • REST
  • Retail Vendor template
  • rules
  • samples
  • search
  • security
  • sifters
  • sites
  • solutions catalog
  • syndication
  • test infrastructure
  • theme
  • theme optimization
  • topologies
  • troubleshooting
  • tutorials on personalization
  • video
  • wcm
  • web content
  • webkit
  • WebSphere Portal
  • WebSphere Portlet Factory
  • wikis
  • workflows
  • worksheet
  • XML configuration interface
  • z/os
  • zos
InformationInformation
You are currently viewing machine translated content. IBM translation might be available. Click IBM Translated Product Documentation to see what is available.X


Home > WebSphere Portal > Visibility Rule Caching in Personalization
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Visibility Rule Caching in Personalization 

expanded Abstract
collapsed Abstract
No abstract provided.
ShowTable of Contents
HideTable of Contents
    • 0.1 Performance impact of disable visibility rule cache
    • 0.2 Disabling the Caches
    • 0.3 API

WebSphere Personalization (PZN) uses many different types of caching. There are three main different types of caching, Internal Cache, Resource Domain, Visibility Rule Caching. Internal cache, resource domain are covered in the Best Practices for using Personalization (http://www-10.lotus.com/ldd/portalwiki.nsf/dx/personalization-best-practices) and won't be covered in depth in this document. This document will cover visibility rule caching, possible problems with visibility rule caching, the differences between visibility rule caching and regular cache, how to manage the cache and a look into the caching API.

Visibility rule caching is only used for visibility rules, and is not used for anything else. This cache takes the results of a visibility rule, show or hide and stores the results in a cache. This will happen for all visibility rules, so if the visibility rule is meant to use dynamic data, the results will not change based on the dynamic data.

This is what happens if a rule runs with dynamic data. The rule will run once based on a the original data, then the results will be cached. When the rule is called again it will not execute again, the results will be taken from the cache. This is not affected by any data changing.

Visibility rules are cached on a per rule. This can be overcome by disabling the cache globally or invalidated via some code which is running. The visibility rule caches lasts per session ( from user login to user log out ).

This is different then the other caches because this cache just stores the results, it does not look at the data to see if it might have changed. Visibility rules also uses the other caches in PZN, as well when the rule executes. The visibility rule cache is on top of the other caches with in pzn, the last item to be cached and the first item to be looked at. This may cause the visibility to react to data which is not expected, because the personalization cache may be stale.

If you are having trouble with a visibility rule try disabling the cache, and sees if that fixes the issue. The rule may have been run before the data is cached. This cause all other time the visibility rule to show the bad results.

The behavior of visibility rule cache changed with PK61143 and PK62311 in 6.0.1.3. Anything after 6.0.1.3 the cache is used more heavily and is more noticeable. If upgrading portal to a version after 6.0.1.3, visibility rule caching should be investigated to see if it will affect the portal instance.

Performance impact of disable visibility rule cache


When any type of cache is disabled there may be a performance impact. This depends on a lot of factors, how many visibility rules are running, how many users and how complex the visibility rule is. These are some of the main factors in determining the performance impact, but there may be others depending on the setup. If the visibility rules are not complex and do not take a long time to run, most likely the impact will not be noticeable, if the cache is disabled. If there are a lot of complicated rules, which takes a long time to run then there will be a performance impact. This all depends how the system is designed. It is all a balance. The rules can also be redesigned to take use of other caching with in personalization.

Disabling the Caches


Disabling the general cache for personalization will NOT disable the visibility rule caching. It is a different settings.

The first step is to locate the right configuration file, all caches uses the same files. The configuration file is located in different place depending on the version of portal.

6.0: <portal_root>/shared/app/config/services/PersonalizationService.properties
6.1: <wp_profile>/PortalServer/config/config/services/PersonalizationService.properties

*** NOTE There are other files called PersonalizationService.properties which should NOT be used ***

*** DO NOT USE ***
<wp_profile>/PortalServer/wcm/shared/app/config/wcmservices/PersonalizationService.properties
<portal_root>/wcm/prereq.wcm/wcm/config/templates/shared/app/config/wcmservices/PersonalizationService.properties
<portal_root>/pzn/prereq.pzn/properties/config/services/PersonalizationService.properties (example file)
<portal_root>/wcm/shared/app/config/wcmservices/PersonalizationService.properties

Now that right file is selected the following items need to be changed:

To disable visibility rule caching rulesEngine.attributeBasedAdmin.enableCaching=false. This will disable the visibility rule cache only.

DO NOT disable general caching by setting rulesEngine.cache.enabled=false. This will disable the caches of the data, but not visibility rule caching.

For more information about settings and caching settings please refer to Best Practices for using Personalization (http://www-10.lotus.com/ldd/portalwiki.nsf/dx/personalization-best-practices) and the information center.

API

PznTransformationModel class, handles the visibility rule caching API. There are two main methods for invalidating the visibility rule caches invalidate(javax.servlet.http.HttpServletRequest request) and invalidate(javax.servlet.http.HttpServletRequest request, java.lang.String rule). They show up in many different ways. The methods are used for invalidating all the visibility rule or just for a single rule. This will only invalidate the visibility rule cache, not the cache which the visibility is may be based on.

Example for invalidating visibility rule cache.
PznTransformationModel.invalidate(request);
PznTransformationModel.invalidate(request,”/testViz”);
The first line will invalidate all the visibility rule that were used with the request object. The second line just invalidate the cache for the /testViz rule.

Please refer to the JavaDoc API for more information.


expanded Article information
collapsed Article information
Category:
WebSphere Portal, WebSphere Portal Enable for zOS, WebSphere Portal Express,
Tags:
6.0, 6.0.1, 6.0.x, 6.1, 6.1.0.1, cache, caching, personalization, Portal

This Version: Version 7 July 20, 2010 12:33:40 PM by Lynne K Wood  IBMer

expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (7)
collapsed Versions (7)
Version Comparison     
Version Date Changed by               Summary of changes
9 Jun 19, 2009 1:28:36 PM Laura Sohval  
This version (7) Jul 20, 2010 12:33:40 PM Lynne K Wood  
7 Apr 2, 2009 2:15:47 PM Christopher Maul  
6 Jul 20, 2010 12:32:12 PM Lynne K Wood  
5 Jul 20, 2010 12:28:45 PM Lynne K Wood  
4 Jul 20, 2010 12:27:18 PM Lynne K Wood  
3 Jul 20, 2010 12:25:50 PM Lynne K Wood  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • IBM Social Business User Experience Blog
  • IBMSocialBizUX on Twitter
  • IBMSocialBizUX on Facebook
  • Lotus product forums
  • IBM Social Business UX blog
  • IBM Collaboration Solutions
  • Recently added feedRecently added
  • Recently edited feedRecently edited
  • Recently added comments feedRecently Added Comments
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Contact IBM
  • IBM Terms of use
  • Wiki terms of use