cancel
Showing results for 
Search instead for 
Did you mean: 

Server cache settings

Former Member
0 Kudos
58

Hi Experts,

Where can i find out the properties of iviews like..

whether iview is using server side caching and server caching time out and iview server related properties.

Any help would be highly appreciated.

Regards,

Karthick

Accepted Solutions (0)

Answers (2)

Answers (2)

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Karthick,

If you look in the Javadocs, there is an interface IAttrPcmLaunch

(in package com.sap.portal.pcm.attributes), which contains all the constants for getting caching information.

The interface IAttrLaunchValues contains the standard valid values for these attributes.

And, of course, you know how to do a lookup, :-).

Hope this helps.

Daniel

P.S.: Be aware that the interface IAdminBase, among others, is not officially public.

Former Member
0 Kudos

Hi Daniel,

If I give iView pcd path,I am iterating iView properties as usual,do you have any code sample for getting iView server,caching related details.

sample :

1. iView server name.

2. Server cache timeout.

3. iView is using server cache or not.

If you have sample code for getting these properties..please give me ,It will be helpful.

Thank you for your earlier answer.

Regards,

Karthick

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Karthick,

I'm not clear on what you need.

Do you want to look up the PCD values for server cache settings for the iView? That I can dom but I will not know for any request whether the data is coming from the server cache. For example, the iView may be set to use the server cache, but there might not be any cache.

As for iView server name, do you simply mean the name of the portal server, like in http://<server>:<port>?

Daniel

Former Member
0 Kudos

Hi Daniel,

Thank you for your reply.

I'd like to retrieve the PCD values for server cache settings.

Thats enough for me.Do you have code sample for that?

Regards,

Karthick

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Karthick,

The following retrieves the settings that determine:

  • whether the iView can be cahced on the client (browser)

  • whether the iView is cached on the server

  • how long the cache is valid for

Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
env.put(Context.SECURITY_PRINCIPAL, request.getUser());

InitialContext iCtx = null;
String iView = "portal_content/DanielContent/Corporate";

try {
    iCtx = new InitialContext(env);
		  
		  
    IiView myIview = (IiView)iCtx.lookup(iView);

    response.write(myIview.getAttribute(IAttrPcmLaunch.ATTRIBUTE_ALLOW_BROWSER) + "<BR>");
    response.write(myIview.getAttribute(IAttrPcmLaunch.ATTRIBUTE_CACHING_LEVEL) + "<BR>");
    response.write(myIview.getAttribute(IAttrPcmLaunch.ATTRIBUTE_VALIDITY_PERIOD) + "<BR>");
		
}
catch(Exception e) {
    response.write ("SYSTEM: error in binding"+ "<BR>" + e.getLocalizedMessage() + "<BR>"+ e.getMessage() + "<BR>"+ e.toString() + "<BR>");
}

Hope this helps.

Daniel

Former Member
0 Kudos

Hi Daniel,

Sorry for the late reply.

Actually these properties I am getting already.

but i'd like to get whether the iview is using server cache or not ,Server cache time out , channel detail of iview.

Could you please let me know how to use these API's

com.sap.portal.pcm.iviewserver

com.sap.portal.pcm.iviewserver.attributes

com.sap.portal.pcm.iviewserver.cache

Regards,

Karthick