Part 2: ADVANCED Caching Techniques In Oracle WebCenter Sites 12c

Part 2: ADVANCED Caching Techniques In Oracle WebCenter Sites 12c

Welcome back! Let’s continue our discussion about caching techniques in Oracle WebCenter Sites (OWCS). In this article, let’s go a bit advanced into coding.

Setting style attribute in render:calltemplate

Inspired ECM Blog - Andrew Blackman - Part 2: ADVANCED Caching Techniques In Oracle WebCenter Sites 12c - 1

render:calltemplate is the OWCS tag predominantly used to call a Template. “Style” is a flag that indicates that the called Template should be called as an element or as a pagelet, and if it is to be called as a pagelet, should it be embedded in the parent for Satellite Server or should it be an independent pagelet. The default value is pagelet. It has 3 possible values, namely pagelet, embedded, and element.

Setting this attribute value to element will result in the template being called as an element. This is useful if a nested pagelet is not necessary or desirable (in other words, it would be overkill) for the target Template.

When the style is element, the scope of the called element is local: only variables specified as arguments and attributes will be accessible to the called element, and variable values in the caller will not be affected.

When the style is set to embedded, the nested template is invoked as a pagelet without using Satellite Server. This causes the pagelet to be independently rendered (and possibly cached) by Sites but the result of the pagelet is embedded in the caller, just as if it had been called as an element. Satellite Server does not see embedded pagelets as separate from their caller; they are simply part of the output of the caller.

Note that if this is set to element or embedded, the invoked Template will be embedded in the caller and this can have performance, dependency, and caching implications, which can be good or bad depending on your code.

Setting style attribute in render:calltemplate

Inspired ECM Blog - Andrew Blackman - Part 2: ADVANCED Caching Techniques In Oracle WebCenter Sites 12c - 2

This attribute contains a context override parameter. It is only meaningful if the called template contains code which defines a presentation slot, using the insite:calltemplate tag. This attribute contains a context override parameter.

For example, if a “Hero Banner” is to be rendered on both Home and Contact Us pages, then OWCS caches two different copies, which are essentially duplicates and not desired. This is because OWCS caches a pagelet based on its parent also, in the context info. So, declaring an empty context attribute like context=”” will suspend that info.

Thanks for joining us for this 2-part series! Stay tuned for more tips and information about how you can best utilize WebCenter Sites for your business. And if you’d like help upgrading your Oracle WebCenter Sites environment from 11g to 12c before the December Premier Support deadline, contact us at Inspired ECM to let our experienced consultants get your environment running efficiently and successfully today.

2018-11-08T12:47:02+00:00

About the Author:

Certified WebCenter Sites (WCS) and Content & Experience Cloud (CEC) expert with more than 9 years of experience in consulting, training, pre-sales and implementation.

Leave A Comment