Forum Stats

  • 3,839,796 Users
  • 2,262,537 Discussions
  • 7,901,058 Comments

Discussions

How to programatticly flush portalControlTreeCache with a specific key

649271
649271 Member Posts: 76
edited Jul 10, 2008 4:29PM in WebLogic Portal
Here is my application:

I have custom desktops in Weblogic Portal 10.0. I am using external security provider but that is not integrated with Portal. So I have my custom identity asserter and authentication provider and I create Weblogic security and Principal. Based on that I have out of the box "Customize" desktop. Which when user customizes, it adds a record in pf_desktop_instance with the username column as weblogic principal user. Now I have to put a "reset" button (so that user can see default desktop) in the header where I am deleting the record for the user from the table but it still displaying the custom desktop as the data is in cache "portalControlTreeCache". When I manually clear the cache, I get desired result. But I want to do it in code may be using tag libraries where i want to delete the cache for that specific user. So the problem is how the get the specific key and then how to delete the cache for that particular user. Disabling cache will have page loading impact so I dont want to disable cache.

Portal Geeks pls come forward.

Thanks
Vishnu

Comments

  • 649271
    649271 Member Posts: 76
    Hi,
    I got Small breakthrough

    <%@ page import="com.bea.p13n.cache.Cache"%>
    <%@ page import="com.bea.p13n.cache.CacheFactory"%>
    Cache cache = CacheFactory.getCache("portalControlTreeCache");
    cache.clear();

    But still I am not able to find the cache key so that I can invoke cache.remove("key")
This discussion has been closed.