CSDT (Content Server Developer Tools) is the most efficient way to work with OWCS (Oracle WebCenter Sites) artifacts. While the CSDT command line is useful to import and export OWCS assets, the CSDT plugin for eclipse IDE is a sophisticated way to work with coding artifacts, namely Templates, CS-Elements, SiteEntries, and WCS_Controllers, etc.
That said, CSDT can be buggy sometimes and we will discuss one such issue in this blog post. You can also read our recent blog How To Fix CSDT Eclipse Plugin Connectivity Issues.
Whenever an asset’s associated template is edit-saved, OWCS doesn’t clear the corresponding page cache and there are no corresponding errors in the log file.
On further debugging, it is found from the Cache Management Tool that ‘some’ of the Templates do not share the cache dependency with the associated Page caches.
It is later found that this discrepancy is due to a bug in the OWCS 12c CSDT plugin. From 12c onward, the OWCS plugin for CSDT doesn’t automatically add the usual logdeps for the template or CS-Element. You can further observe this in the below scenarios.
Scenario 1: A New Template is created from the OWCS CSDT plugin
Result: The below auto-generated code snippet.
Scenario 2: A Template is created from the OWCS Admin console
Result: The below auto-generated code snippet.
We can see a few extra lines of code that are highlighted in the above screenshot:
<%– Record dependencies for the Template –%>
<render:logdep cid='<%=ics.GetVar(“tid”)%>’ c=”Template”/>
So, the root cause for some of the Templates being unable to add to Page cache dependencies is because they lack the compositional dependency with the asset being published. All such buggy Templates are the ones Developer’s have created through the Eclipse CSDT plugin.
Why is this important?
When you view a web page in the browser using a Template that is set to be cached, in general, any assets that are used to generate that web page are logged as dependencies. (It depends on how exactly the assets are used, but in general, if you use a tag such as or , the asset that you are loading or getting attribute values for will be logged as a dependency.) This special tag lets you specify additional dependencies. This is generally how the Template itself gets logged as a dependency.
Caching dependencies are important because they tell Oracle WebCenter Sites that when one of those assets changes, the cached web page is no longer valid, because the change in the asset may have caused the web page content to change.
When you publish or edit an asset, the dependency for that asset gets invalidated. When this happens, any cached web page that has that dependency will be invalid as well. So, if someone requests that web page, Oracle WebCenter Sites will see that the cache is no longer valid and build a new one.
If you’d like more CSDT tips, or help upgrading your Oracle WebCenter Sites environment from 11g to 12c before the December Premier Support deadline, we’re here to help. Contact us at Inspired ECM to let our experienced consultants get your environments running efficiently and successfully today.