That’s exactly what it boils down to. The first layer that is parsed, if it is cacheable, will be cached into the document object and stored on the file system on first access. The next visit to the page will simply load the cached content stored for each top level cacheable tag. To always have content under mySnippet be dynamically determined, you have to make it non-cachable, i.e. [!mySnippet!]. Without it, the results of the snippet evaluated by the first visit will always be presented and evaluation of your snippet will not happen again until the cache is cleared.
That’s good to know. At the same time, since it is possible to get around this limitation by calling a chunk which in turn calls an uncached snippet, it seems that it would be possible to do this more directly, as I mentioned in an earlier post, by simply specifying that you want a certain snippet to come through uncached.
The reason why I’ve set things up the way I have is because the main snippet is my entire template. In my template, I have this code and nothing else: [[template2008]]. I did this because there are a lot of different conditions that I need to satisfy under different circumstances, and I wanted to bundle them all together in PHP code, to make things more streamlined. So in the "template2008" snippet, I have a call to another snippet that I want to be uncached.
My setup may not be typical, but the desire to call an uncached snippet under these circumstances doesn’t seem unreasonable to me.
Maybe someone can offer a better way of setting things up? I want to keep the entire template as PHP code. Using PHx was my original solution, but it got to be unwieldy and impractical due to the complexity of the conditions, so I took it all out into PHP. Again, if there’s a better way, I’d love to hear it. (I’ll take the suggestion of not using Ditto for this circumstance to heart, but I’m also interested in the broader issue of being able to call uncached content from within cached content.)