Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

osb caching - retrieving max-age or expiration time of a cached result possible?

user13154031May 8 2017

Hi,

I have an osb business service cached with osb's built-in caching and fronted with an osb proxy service. The issue is I would like to give clients of the proxy service insight into when a cached result will expire that they can then use when setting cache-control headers for their users.  Max age would be ideal, but expiration might be acceptable as well.

 

It looks like the only cache-related information I can easily get is cache-ttl, cache-originated, and cache-token fields from the outbound variable. So it does not seem possible to get something equivalent to max age (that is, how much relative time is left before the entry expires) from that data, and the only option would be to get absolute expiration time which I could generate with something like fn-bea:remove-timezone-from-dateTime(current-dateTime() + xdt:dayTimeDuration($cacheTTL)). But the issue with that is that only the business service is cached, the proxy logic wrapping it isn't, and so that expiration time I am calculating will always change and update at the time of request for a cached result and not reflect the actual cache expiration time for the result.

 

Is there any way to resolve this issue and get something like max age or expiration time from the response on a cached business service?  I'm guessing I might have to do a java callout, and I have found the com.bea.wli.sb.service.resultcache package in oracle.servicebus.resources.services.jar but there is no javadoc for that I see online, so I am looking at the decompiled classes - I see a lot of cache-related methods, but I have not found any that look like they can retrieve the absolute or relative expiration time. Is there a way to access this via osb's classes/jars?  Do I need to instead use the coherence jars/api's bundled with osb to retrieve this information?  If the latter, which ones would be needed and where are they generally located in the osb install?  Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2017
Added on May 8 2017
0 comments
394 views