Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Explicitly set component cache variable
System
Hey all,
We are trying to create a navigation component which references the sitemap and highlights the currently-active path. Since that active path could change for each page, we need the component to cache on a per-page level. This is the problem.
We've tried using prefixes, externals, and component controllers, but we can't divine exactly what aspect of the component is checked to decide if a valid cached version exists.
I guess, then, I have two questions: first, does anyone know the exact method by which you can cache a component on a per-page level (we're assuming it has to do with the component's parameter map)? and secondly, do we even need to cache these? There will be three instances of the Navigation component on any given page - site-level, section-level, and page-level. Should we be worried about caching these?
Thanks for all the help, I'm a bit disappointed that in an enterprise CMS solution there is no direct reference to the caching methodology, but what can you do?
Cheers.
Find more posts tagged with
Comments
Garth McMillan
I think "I'm a bit disappointed that in an enterprise CMS solution there is no ..." can be used to refer to any part of TeamSite/LiveSite.
As far as caching on a page level goes, I assume you are using a version of LiveSite like 7.3.1? We've just had a support case closed on this.
To cache on a page level (in 7.3.1 at least) you need to manually add an external datum called
iw-ls-page-name
(note: previewing the component (via edit) automatically seems to add this, but it doesn't get added/populated on runtime). You can just leave the datum value blank and the page name will get inserted at runtime automatically.
Migrateduser
That is so weird. I saw that in the external datums when previewing components. I recently tested RequestContext.getComponentModel() and it seemed like the preview showed more datums than I could get access to.
I will give this approach a try and report back.
Garth McMillan
As far as I can tell in 6.7.2 (LiveSite 3.0.1?), for our case at least, that datum was present and populated automatically in runtime/preview as well. However, in 7.3.1 it only gets added/populated in component preview, not page preview or runtime.
I'm not sure why the behavior changed. Though in our case, we would've only got page level component caching in 6.7.2, not across the site(s).