After a few slightly nervous minutes of digging through my code and testing a few alternative bits of code, I’ve realised that template caching does not appear to be compatible with comment previews. Not if the preview page is a cached template, anyway.
I suppose that’s quite logical really, but what I’m hoping is to find a way to make previewing a comment one of the ‘certain events’ that results in the cache being cleared. It works for submitting a comment, so to my mind it would be logical if it also worked for previewing one.
I know that I can make this work by having my comment preview on an alternative template, but I really would like the preview to be a 1:1 representation of what will actually happen when the user hits the submit button. Turning the cache off isn’t at all desirable either, as it’s a relatively complex page.
Can anyone shed any light on this? Thanks.