[Seaside] Re: Template caching
Nevin Pratt
nevin@smalltalkpro.com
Thu, 25 Apr 2002 16:34:59 -0600
Avi Bryant wrote:
>On Thu, 25 Apr 2002, Nevin Pratt wrote:
>
>I might suggest a subclass of IAFileTemplate that does these automatic
>modifications, so that you still get the automatic update when the file
>changes on disk.
>
I <was> going to do that, but didn't think it had much value when I
realized it was my code that was modifying the template, and not
necessarily the template file that was changing. Furthermore, I wasn't
aware of the cache at the time. I also wondered why IAFileTemplate even
bothered to check if the file had changed, because I didn't think
template building was a high-overhead activity, and didn't think it was
that big of a deal to just update every time. But I think you can see
some of these comments reveal inexperience with the framework (even *I*
can see that now :-).
Subclassing IAFileTemplate might, in fact, be the best way. I'd
probably only have to override #parseTemplate, and hook my programmatic
editing in there.
>
>Are these programmatic edits that couldn't be handled by the macro system?
>I'm not saying that changes very much - you still do have to manually
>flush the caches when you modify your macro code, unless you've got a
>debugging mode as above. But since that's what the macro system's there
>for, I'm curious what you're doing that can't be easily expressed in it.
>
I haven't wrapped my brain around the macro system yet, so I can't
answer that. Again, though, you might be right. I just don't know.
Nevin