Iview caching on base of  "ICacheValidator"

I try to redefine the caching for my portal component, by using ICacheValidator. Although i implemented the functions "isCacheValid" and "getValidationKey" it seems as if these functions are not used.
At last i tried to run following simple program, where still none of the 2 functions is called.
IView and page where created according to the comments in the code. Deployment descriptor is added as well further down.
code:
package com.sap.portal.iviewtest.caching;
import com.sapportals.portal.prt.component.*;
import com.sapportals.portal.prt.pom.IEvent;
How to implement caching functionality
1. declare an iview property for the key in portalapp.xml
2. retrieve this property for key computation
3. implement ICacheValidator
4. return custom computed key in getValidationKey()
5. check current key to computed key in isCaheValid()
remarks: -     first call to component/iview will deliver NULL as pagecache key
                              until iview property changes
                         -     alway change properties on iview direct noct on deltalinks
iview properties:
CacheLevel: Shared
IsolationMode: Embedded
page properties:
CacheLevel: Shared
IsolationMode: URL
public class CachingIview extends AbstractPortalComponent implements ICacheValidator{
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
         System.out.println("doContent");
               response.write(""+System.currentTimeMillis());
    /* (non-Javadoc)
@see com.sapportals.portal.prt.component.ICacheValidator#isCacheValid(com.sapportals.portal.prt.component.IPortalComponentRequest, java.lang.String)
    public boolean isCacheValid(IPortalComponentRequest request, String key) {
      System.out.println("KEY: "+key);
               return getKeyProperty(request).equals(key);
    /* (non-Javadoc)
@see com.sapportals.portal.prt.component.ICacheValidator#getValidationKey(com.sapportals.portal.prt.component.IPortalComponentRequest)
    public String getValidationKey(IPortalComponentRequest request) {
      // TODO Auto-generated method stub
      String key = getKeyProperty(request);
               System.out.println("getValidationKey "+key);
      return key;
    /* (non-Javadoc)
@see com.sapportals.portal.prt.component.IPortalComponentInit#init(com.sapportals.portal.prt.component.IPortalComponentInitContext)
    public void init(IPortalComponentInitContext arg0) {
      // TODO Auto-generated method stub
      System.out.println("init");
     private String getKeyProperty(IPortalComponentRequest request) {
          try{
               return     ""+request.getComponentContext().getProfile().getProperty("KeyProperty");
          }catch(Exception e){
               return "";
portalapp.xml:
<?xml version="1.0" encoding="utf-8"?>
<application>
  <application-config/>
  <components>
    <component name="CachingIview">
      <component-config>
        <property name="ClassName" value="com.sap.portal.iviewtest.caching.CachingIview"/>
        <property name="SecurityZone" value="com.sap.portal.iviewtest.caching/low_safety"/>
      </component-config>
      <component-profile>
           <property name="KeyProperty" value="0"/>
      </component-profile>
    </component>
  </components>
  <services/>
</application>

Problem solved.
Thanx

Similar Messages

  • KM Cache and iView Cache - Pros and Cons

    Hi All,
    Can anyone tell me which Caching mechanism is better - KM Caching or iView Caching ?
    What are the Pros and Cons of KM Caching and iView Caching ? Which type of caching is recommended ?
    Any kind of help is appreciated.
    Regards,
    Adren

    Hi Adren,
    As to my understanding, with Portal Cache, we can achieve the following:
    1. Significant improvement in the interface response time
    2. Unnecessary, additional page generation (re-rendering) is avoided when you call a portal page
    3. Web browser-like caching for server-based, dynamic pages in the Web (such as the BW Application Web)
    Cache monitor to monitor the current status of all active caches in your system landscape. The data displayed in the cache monitor can be used for evaluations
    KM cache might eb better than Iview cache.
    Please check the below links we might get soem info about the type of cache which is preferable.
    http://help.sap.com/saphelp_nw04s/helpdata/en/1d/33863c68bebc2ce10000000a114027/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/57/29e334d0049967e10000009b38f83b/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b52de690-0201-0010-c5a6-b4bde0a12e44
    Hope this helps you.
    Good Luck!
    Regards,
    Shaila...

  • IView Caching BrowserOnly setting

    Hi,
    Can anyone shed some light on the BrowserOnly setting that is available in the Load properties of an iView? It does not seem to do anything in particular and all i can find on SAP Help is this....
    http://help.sap.com/saphelp_erp2004/helpdata/en/75/e3fc40b3c7fa6fe10000000a1550b0/frameset.htm
    Apparently it is supposed to allow caching only in the browser cache and not in the PRT cache... but the iViews I am testing are not stored in the Browser Cache for some reason....
    Any experience on this would be a great help.
    BRgds,
    Simon

    Make sure:
    1-your the local cache on your browser is not full
    2-your system wide setting is not over riding the iView level setting - system setting can be found here:
    System Administration > System Configuration
    from Detailed Navigation: Service Configuration
    more details are found here:
    http://help.sap.com/saphelp_nw04/helpdata/en/1c/3f1c409ce22402e10000000a1550b0/content.htm
    We wanted to do the opposite, to make the iViews not cache on the browser which contain sensitive data, particularly due to users that share computers. So we had to change the iView cache property to None. The BrowserOnly setting should be used with iViews that don't need to change often for improving performance of the Portal.

  • IView Caching

    Hi Portal Knowledgeable ones.
    I am on EP6 SP13.
    I am having a problem with caching.  I have a URL iview retrieving static content from root.../StaticContent/News.html.  After I update News.html on the portal server, the new content is not displaying.  The cache settings that I know about are set properly. 
    The application cache (content fetching service) is set to true.  I do want to cache at the client side sometimes.
    However, on the News iView, I've set the following LOAD parameters:
    - Allow Client Side Caching - NO
    - Cache Level - None
    Based on what I know, this should cause this specific iView to be retrieved from the portal server everytime.  However, that is not happening.
    What else do I need to know about?
    Thanks for any assistance.
    Kevin

    Hi Kevin,
    As far I understand, the issue is not with the caching by URL iVIew or the portal iViews/pages -- I believe it is not caching the info.
    It has to do with the fact that the specific URL you are going to -- in this case, the J2EE engine -- is caching the page.
    I tried the same thing you did, but moved the page to another web server -- IIS -- and there was no caching.
    You need to check the J2EE caching on your server.
    Daniel

  • "iView Cache" clearing

    Hi All,
    We have set Caching of iView to 8 hours and shared.
    Cache Level
    Cache Validity Period
    If we require to clear cache without resetting these values, how to do it.
    Regards,
    Ganga.

    Hi,
    You should clear PCD cache, check this:
    clear cache
    Regards,
    Praveen Gudapati

  • Iview Cache setting

    So I'm thinking about improving my iview performance by making a setting change on the iview.
    from: cache - NONE
    to: cache - SHARED
    But the cache validity period. Does it even matter here?
    Mike

    Hi Mike,
    As the iview performance is improved by Caching, the cache level palys a prominent role.
    The cache levels are of four options in all. namely Shared, User, Roles, Session and No Level(none).
    Cache validity is respected, regardless of any particular cache level, except for None. For example, if the cache level is Session, and the cache validity is set to two hours, the iView content is retrieved from the source the first time a user logs on, and then comes from the cache for the next two hours only, even if the session lasts four hours.
    So the cache validity period does matter if we are using the calche level option and for No cahche level it does not depend on the performance of the iveiw.
    For more info pls check the below link.
    http://help.sap.com/saphelp_nw04/helpdata/en/5f/2720a513ea4ce9a5a4e5d285a1c09c/content.htm
    Hope this helps you.
    Good Luck!
    Regards,
    Shaila

  • Caching problem for iViews with URL parameters

    Hi,
    We have a big problem with <b>iView caching.</b>
    Our objective is to use <b>SAP Netweaver Portal 2004s & External Facing portal </b> for a public Internet Portal
    For performances reasons we need to activate iviews caching on the principal iviews. But the problem is that a page called with different parameters generates exactly the same html result
    <u>example --> The display of a news item:</u>
    /irj/portal/anonymous/index.htm?rid=/news_123.xml
    gives the same cached result as
    /irj/portal/anonymous/index.htm?rid=/news_456.xml
    The caching level is "shared" because all users are anonymous !
    The iview caching seems to be occuring on component (iView) level and not on URL level
    Can someone help ?
    At the moment we have performances of 10 seconds for a page, and with caching it's becoming less than 1 second, so we really need the caching !!!
    Thanks
    Laurent

    Hello
    I hope you get your answer since, nevertheless it could help other.
    Have you tried to put the cache level to "session" instead of "user" or "shared" at the iview level?
    Regards
    Benoit

  • IView not processed for second time, but 'old' cached data is displayed...

    <b>I have the following scenario</b>:
    In IView 1, I select a notification number. Then, I click on a button to create a service order.
    This calls IView 2, and the notification number is passed as a request parameter to IView 2.
    The problem happens when I close the popup and select another Notification to do the same thing with. When the popup is called, the old data is still there. The IView itself is not processed (no doInitialization etc).
    <b>Details</b>:
    The parameter is passed correcty to the other IView.
    This is done by using:
    a = window.open('<%=String.valueOf(Constants.QUICKSERVICEORDER_COMPONENT)%>?notificationnumber=<%=R3_Notification.getNotificationNumber()%',
    'createserviceorder',
    'toolbar=no,menubar=no,location=no,personalbar=no,titlebar=yes,scrollbars=auto,resizable=yes,width=600,height=500');
    In the second IView's java part, the parameter is picked up:
    notificationnumber = request.getParameter("notificationnumber");
    That did work in the previous Portal version, so there's really no reason to believe it's wrong now...
    But after upgrading to EP6, it does not behave the same way anymore.
    I added messages to the defaultLogger, to write to the log at doInitialization.
    Then, I can see that output is NOT written...
    It looks like the popup IView is not being called again, but just displays the OLD data.
    Unless I upload the component again to the Portal.
    Then it works. Once. Looks like a caching issue to me.
    Just clicking on the 'x' to close the window doesn't seem to clear the cache.
    So I have to find a way to refresh this IView or clear its Cache or something...
    But how is a mystery...
    Anyone else encounter this problem?

    Yes, that solved the problem.
    Thanks very much!
    Background info (might be helpful to others...)
    We migrated from 5.0 to Portal 6.20. This caused problems with caching.
    There are differences between caching in those versions. But the main reason was that the portal version information was set in the portalapp.xml file...
    To solve the issue, the lines referring to the portal version have been removed from the portalapp.xml:
      <application-config>
        <property name="ClassLoadingPolicy" value="5.0"></property>
        <property name="DeploymentPolicy" value="5.0"></property>
        <property name="AuthenticationPolicy" value="5.0"></property>
      </application-config>
    Also, a line was added in the Portalapp.xml:
        <property name="ALLOW_BROWSER" value="No"/>
    If the component is called directly (as in our case), then the Iview caching will not be used. All the caching has to be done via the portalapp.xml file.

  • Cache issue coming in Start Process for Employee iView under MSS

    Hi,
    Navigate to MSS -> Team -> HCM Process and Forms -> Start Process for Employee
    In Start Process for Employee iView, when I clicks on Refresh link at the bottom right of the table the Direct Reports got removed from the table (which is correct) but when I navigates to some other screen and comes back then again the previous data comes back. It seems to be cache level issue. Even I logs off and login the same data comes back which should not happen.
    I have checked the forum [Team=>Personnel Developent=>Employee Search; and found it that Refesh property will work if I set the parameter of iview Cache Lifetime = -1 then it will disable the caching at all.
    And I wants the same behaviour for Start Process for Employee iView. But I am not able to find the similar property in Start Process for Employee iView.
    Anyone have an idea of What is the resolution for this issue?
    Regards,
    Deep

    Hi Deep,
    now I understand your problem )
    To me it sounds like an OADP cache issue rather than one in Portal. The iview uses OADP which again uses the cache which does not reflect on the actual current org-structure.
    One possibility would be enhancing the WD4A and call FMs
    HRWPC_OADP_DELETE_TGTOBJCACHE
    HRWPC_OADP_DELETE_SRCHOBJCACHE
    HRWPC_OADP_DELETE_NAVOBJCACHE
    HRWPC_OADP_DELETE_DATAVWCACHE
    dependent on what you want to delete to refresh.
    I would probably try to enhance HookMethod WDDOINIT in Component Controller and call them there, but that's just a guess; could be complete nonesense.
    Another possibility would be trying to add the application parameter "sap.xss.req.crt.cachelifetime=0" to the iView.
    Links for reference:
    http://help.sap.com/saphelp_ppm50/helpdata/en/21/1ac5ca5cad46528d4f970cc03b8e8f/content.htm
    Web dynpro abap and OADP cache
    http://help.sap.com/saphelp_dimp50/helpdata/DE/97/7f754067025537e10000000a1550b0/content.htm
    hope this helps a bit now
    regards, Lukas

  • How to clear the cache in the portal browser

    Hello Experts,
    Iam unable to clear the cache in the portal. I tried  clearing the Navigation cache , PRT cache,PCD cache,Database cache,UME cache.
    The senario is in the browser if iam logging with some user X , he should see only 1,2,3 countries, and if i logg off and again logg in the same browser with different user he is seeing same 1,2,3 countries unlike he should see 4,5 countries.
    But if iam opening in different browser iam getting the correct one with cache cleared.
    I want to acheive this in the same browser.
    Qucik help in solving out this cache problem is appreciable.
    Regrds,
    Manasa.

    There is one more important cache: the HTTP Provider Service cache (in VA).
    To find out why the browser is showing the same languages, analyze what the server is sending to the browser with HTTPWatch or Firebug and look at the cache flag. Also check what is the iView cache parameter? Is it user, session, shared or none?
    How do you do the logoff? The best thing is to make sure that the HTTP Session is killed. If not, the portal may send data that is cached for the HTTP Session to the browser. When you open a new browser, you will also open a new HTTP Session. That could be the cause why it is working with a new browser instance.
    br,
    Tobias

  • IViews are not updated in customized top level navigation

    Hi experts,
    I am working on External Facing Portal. I developed customized top level navigation. The problem is that the content area of External Facing portal is not refreshed. Although, i can see different navigationURLs but content area iView remains same. For testing purpose, i assigned role (which i created for anonymous access) to a new portal user. All pages/ivews/ for that role are working fine and content area is also updated when i click on different navigation. Remember that is standard portal not anonymous. It means through myserver:50100/irj/protal?NavigationTarget=navurl://cb0c473832f39033f88904647de63252 all navigation is working fine including content area but when i access External Facing Portal through  myserver:50100/irj/protal/anonymous?NavigationTarget=navurl://cb0c473832f39033f88904647de63252 navigationURLs is updated but the content area remains same. Content area contains 1 page and page itself contains 1 iVew. I assigned that light page to Light Framework page.
    Do i need to implement navigation connectors for that issue or i miss something?
    waiting for your response.
    regards
    Abbas

    Have you tried disabling the iView caching (check the iView and page properties). Your browser and proxy server (as you mention it is external facing) may also be caching the content, hence the reason when you use your user ID and the Java restart occurs everything is reset correctly.
    I know when doing Visual Composer developments that SAP EP caches the Function Module interfaces and that in the development environment I needed to change parameters in Visual Admin for the VC component lifetime to handle these. It could well be that you are referencing components that have lifetime keep alive set for them in the environment too. Refer to the API / SDK documentation if you suspect this could be the case for you too.
    What exactly is the iView in the content area doing? Is it just a transactional iView or is it a custom iview?
    If you can perhaps try putting on an http trace or monitor the NWA logs to determine if any issues exist. You Java VM may also require some more fine tuning in the external facing scenario - the GC may not be collecting items efficiently.

  • Remove cs3 bridge cache after installing cs5

    I removed cs3 including bridge and installed cs5 and find that the cs3 bridge cache and associated files are still in my hard drive occupying 6.5GB of space.  Can I remove this and how?

    CS3 and CS5 uses different cache data bases, so you can delete them using the CS3 purge cache in preferences.  If you have uninstalled CS2 just delete the files.

  • Dynamic Replacement of IView

    Hi all,
    A portal page to integrate several kinds of contents is in general the best way.
    But how can you handle dynamic replacement of an iView of a page (the page contains more than one iView) by another one by using the Portal navigation service of the WebDynpro Runtime? If I navigate to the target application with mode WDPortalNavigationMode.SHOW_INPLACE, the content of the page at all is replaced by the target iView. Is there a possibility to access/replace only the desired iView of the page?

    Hi Purav,
    You can refer to this [link|http://help.sap.com/saphelp_nw70/helpdata/en/5f/cf9d4207e1c86ae10000000a155106/frameset.htm] for dynamic assignment of an iview to a page.
    Do you want to assign a particular iview on the basis of user access?
    If yes you need to personalize iview properties for individual users.
    Hope it helps.
    Thanks,
    Ami
    Points are always welcomed.

  • SSO to Form Based Application

    Has Access Manager yet added the ability to do "form memory" for easy SSO integration to applications performing form based authentication. This is a feature found in products such as Netegrity Siteminder and CA's stuff.
    This is easier for legacy applications with closed code than trying to modify the login sequences for these applications.
    Z

    Hello Romano,
    thank you for assisting so much.
    Yes, the text itself is always new, but when i believe what it is saying, the content following is not new.
    Or do i only mis-interpret the meaning of that text ? Does it perhaps analogously  mean: "He User, the content you see was just fresh constructed and cached in the ApplicationCache and then sent to you" or .
    I also found the "com.sap.portal.httpconnectivity.urlfetcherservice" and played with it, but with that i achieve cache settings for all applications used and not for only the one i would like it for.
    I posted this also in category "Portal Content Development",
    URL iview Cache -> How can i empty the ApplicationCache
    and there are also interesting answers.
    Kind regards
    Andreas

  • No internet in Wine for WoW

    Hello everyone.  Having some trouble running World of Warcraft on my Arch system under Wine.  I run wine ./Launcher.exe, and this is what I get:
    [World of Warcraft]$ wine ./Launcher.exe
    fixme:process:GetLogicalProcessorInformation (0x33e3f8,0x33e9f8): stub
    fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (15000): STUB
    fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 15000
    fixme:process:GetLogicalProcessorInformation (0xeec034,0xeec634): stub
    fixme:process:GetLogicalProcessorInformation (0xeec034,0xeec634): stub
    fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (15000): STUB
    fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 15000
    fixme:process:GetLogicalProcessorInformation (0xfee3b4,0xfee9b4): stub
    fixme:process:GetLogicalProcessorInformation (0xfee3b4,0xfee9b4): stub
    fixme:process:GetLogicalProcessorInformation (0xfee3b4,0xfee9b4): stub
    fixme:process:GetLogicalProcessorInformation (0xfee3b4,0xfee9b4): stub
    [World of Warcraft]$
    And I get a window pop up in typical WoW fashion stating that I need to check my network and try again.
    I thought maybe this was a wine problem itself, so I tried installing Firefox for Windows under wine, and it works just fine.  I tried running Launcher as root, but I got the same result. 
    so I tried running wine ./Wow.exe and this is what happens:
    World of Warcraft]$ wine ./Wow.exe
    err:winediag:X11DRV_WineGL_InitOpenglInfo Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly
    err:module:load_builtin_dll failed to load .so lib for builtin L"winemp3.acm": libmpg123.so.0: wrong ELF class: ELFCLASS64
    fixme:process:GetLogicalProcessorInformation (0x33f640,0x33fc40): stub
    fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (3000): STUB
    fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 3000
    fixme:process:GetLogicalProcessorInformation (0x147bfbc,0x147c5bc): stub
    fixme:process:GetLogicalProcessorInformation (0x147bfe8,0x147c5e8): stub
    fixme:process:GetLogicalProcessorInformation (0x157e390,0x157e990): stub
    fixme:process:GetLogicalProcessorInformation (0x33f468,0x33fa68): stub
    fixme:process:GetLogicalProcessorInformation (0x33f468,0x33fa68): stub
    archive Data\enUS\base-enUS.MPQ opened
    archive Data\oldworld.MPQ opened
    archive Data\enUS\oldworld-enUS.MPQ opened
    archive Data/Cache/SoundCache-3.MPQ opened
    archive Data/Cache/SoundCache-2.MPQ opened
    archive Data/Cache/SoundCache-1.MPQ opened
    archive Data/Cache/SoundCache-0.MPQ opened
    archive Data/Cache/enUS/SoundCache-enUS.MPQ opened
    archive Data/wow-update-oldworld-13154.MPQ opened
    archive Data/Cache/enUS/patch-enUS-oldworld-13154.MPQ opened
    archive Data/Cache/patch-base-oldworld-13154.MPQ opened
    archive Data/Cache/enUS/SoundCache-patch-enUS-13154.MPQ opened
    archive Data/Cache/SoundCache-patch-13154.MPQ opened
    archive Data/wow-update-oldworld-13286.MPQ opened
    archive Data/Cache/enUS/patch-enUS-oldworld-13286.MPQ opened
    archive Data/Cache/patch-base-oldworld-13286.MPQ opened
    archive Data/Cache/enUS/SoundCache-patch-enUS-13286.MPQ opened
    archive Data/Cache/SoundCache-patch-13286.MPQ opened
    archive Data\art.MPQ opened
    archive Data\world.MPQ opened
    archive Data\sound.MPQ opened
    archive Data\enUS\locale-enUS.MPQ opened
    archive Data\enUS\speech-enUS.MPQ opened
    fixme:win:EnumDisplayDevicesW ((null),0,0x33ed7c,0x00000000), stub!
    err:d3d_caps:WineD3D_CreateFakeGLContext Can't find a suitable iPixelFormat.
    err:d3d:InitAdapters Failed to get a gl context for default adapter
    Direct3D9 is not available without OpenGL.
    err:d3d_caps:WineD3D_CreateFakeGLContext Can't find a suitable iPixelFormat.
    err:d3d:InitAdapters Failed to get a gl context for default adapter
    Direct3D9 is not available without OpenGL.
    [World of Warcraft]$
    and it pops up with a window from wine saying "Failed to find a suitable display device. Exiting Program". Looks like my video drivers are having issues.   lspci | grep VGA gives me:
    05:00.0 VGA compatible controller: nVidia Corporation G98 [GeForce 8400 GS] (rev a1)
    and lsmod | grep nv results in:
    nvidia 10025938 40
    i2c_core 18070 3 videodev,nvidia,i2c_i801
    Has anyone else had this happen to them, and if so, what can I do to fix it?  I only have Windows installed on my computer to play WoW, and I would much rather get rid of it and play WoW under wine.  Any help is greatly appreciated! Thank you very much.
    David
    [email protected]

    With the most current launcher, it hasn't worked for me, even with the latest version of WINE.  What i would suggest, is apply the patches manually,( put them into your main WoW folder, run them from either the file manager, or from command line, and let them install.  While this is tedious, you need to apply the in sequential order, otherwise you'll run into problems.  After you have all the patches applied, just run the game from wow.exe, and skip the launcher, you can change all necessary settings either from in the game, or from the config.wtf file.

Maybe you are looking for