I have written custom stylesheet to grab some attributes from LDAP. I want to cache these data somewhere in Datapower so that i dont need to hit the LDAP each and every time. How can i achieve this?
This topic has been locked.
5 replies Latest Post - 2012-10-29T18:28:24Z by HermannSW
Pinned topic Caching LDAP data
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-29T18:28:24Z at 2012-10-29T18:28:24Z by HermannSW
Re: Caching LDAP data2012-10-24T08:41:19Z in response to Arnab_GhoshHi,
> I have written custom stylesheet to grab some attributes from LDAP.
> I want to cache these data somewhere in Datapower so that i dont need to hit the LDAP each and every time. How can i achieve this?
the InfoCenter for dp:ldap-seach() states:
A node set corresponding to an XML fragment that contains the search results.
DataPower does provide a document cache, see under XML managers on how to configure/use.
So if you
- create a new service on the box
- accessing LDAP and returning XML node-set
- with document caching configured/enabled
- and access the LDAP not directly as you do now, but through the new chained service
Another option might be the use of AAA, especially Defining the authentication method:
User Auxiliary LDAP Attribute
Define the list of LDAP attributes as the auxiliary information for AAA. Use a comma as the delimiter.
For example, email,cn,userPassword. Results are appended to the context variable var://context/ldap/auxiliary-attributes.
The LDAP attributes are synchronized to the AAA authentication cache.
Re: Caching LDAP data2012-10-26T18:47:17Z in response to Arnab_GhoshHi,
there is a maximum size you can define in XML manager, little bit more than 160MB.
You can find the exact value by specifying eg. 200.000.000, then the error message will tell you the exact maximal value.
But that does not mean that you cannot cache more -- just use many xML
managers, each of maximal doccache size.
Re: Caching LDAP data2012-10-26T22:53:49Z in response to HermannSWHI Hermann,
I am having a strange issue. Say i am calling service B from service A. In service A, I am caching the response from service B. Say Cache time is set as 60secs. So if I call second time after 60secs, the response is not retrieved from cache and so its giving a call to the service B but instead of one call its giving two call one with HEAD (this one fails) and the other with GET(this one returns correctly). But this response is not cached by the service A. If I give third call within 60 secs, then only one call goes to Service B as expected and the response is also cached properly.
I check the Document Cache Status and its showed that, after 60secs of the first call, the document cache size is not 0(say X bytes) but after second call(the one which triggers two call -HEAD and GET), the document count remains 1 but size is 0 bytes. After 3rd call, the cache size changes to X bytes again.
Can you let me know I am doing something wrong? From where two calls are going to the service B from Service A and why the first one is HEAD? I tried to call the service service B from SOAP UI using GET and the service B is working properly but service A is behaving strangely
Re: Caching LDAP data2012-10-29T18:28:24Z in response to Arnab_GhoshHi,
the HEAD can be OK (to determine whether remote ressource is unchanged).
But as you said the 2nd HEAD+GET should end with an entry in document cache.
Please create a PMR, then Level2 support will collect the necessary data (firmware version, service export) for investigation.