Component Caching Issue - Solved!
This one had me scratching my head for a while....
I built a component to dynamically capture the url of a page using the following code (NOTE: The Mura editor may have altered some of the calling code, so be sure to doublecheck your code if you copy and paste):
<cf cacheomatic="" key="page#$.content('contentID')#" nocache="1">
<cfoutput>
<a href="/mura/$.getCurrentURL()//mura/">/mura/$.getCurrentURL()//mura/</a>
</cfoutput>
</cf cacheomatic>
As you can see I delibrately set the nocache tag to a value of "1" which is supposed to tell the cfcacheomatic tag NOT to cache the results. "Supposed to...."
The trouble is when I logged in to my Mura site and worked in the admin, the code behaved as expected, returning the proper URL for the requested page that I added this component to. However, any other browser would only show the most recently cached URL from the component, so the wrong URL would get displayed on all other pages. What I perceived was, even though I set the cacheomatic tag NOT to cache the results, it was anyway. I double-checked that I had Site Caching turned on.
Solution: Edit Component page, Advanced tab, check Exclude From Site Cache checkbox.

Comments
- Rich Leach
-
Please keep your posts relevant to the topic:
Component Caching Issue - Solved!
All non-relevant postings and/or spam will be removed. Thanks!
- February 25, 2011, 2:34 PM
- Reply
Copy and paste the URL below:

