(This is Teamsite 7.4 on Tomcat)
If you can bare with me whilst I try and explain, I'm no expert on Teamsite but it is what it is and we also have a custom external loading "framework" I'm still not very clear on.
We have a requirement where based on HTTP headers for each page request we need to conditionally render links and data.
I started building an external for the existing component it needs to be rendered from, however based on this custom external loader framework we have, I think it may cause performance issues.
This framework dynamically loads DCR's via a base external (e.g. for localisation etc), typically our components are cached until published and the external isn't executed till then. This particular component uses a number of DCR's so I figure it'd be poor on performance if we set the component to cache - never, especially as this component is on every page.
Originally I started developing a site controller to add page tokens I could use in the XSLT, though I realised I couldn't do conditional XSLT testing on them (because of when page tokens are processed). Reading the 7.4 SiteDeveloper PDF it seemed to say it was possible to insert Datums via a site controller e.g.
At design time, you can use Generator to populate datums with data using a PropertyContext, this is a way to insert data as a peer node. The code is executed and parameters are passed in, the result is appended as a peer node. This is useful in dynamically altering the contents of a Datum
It appears that means that'll be added to each component rendered by the page? The documentation is very unclear so I don't know if this is a possible solution.
Really, all I want is a performant way to add data that varies per request and limit the caching settings I need to make to components.
Any advice is more than appreciated...
As an aside, I'm really unclear how the JCS cache works in respect to pages and how that interacts with components. I can see through the JCS admin page that pages, components, css and rules are cached; but if a .page file is cached how does that interact with components when they're set to not cache? I also can't see any cache settings for pages, is that only done via the cache.ccf file?