Regarding to caching, I might just try the following:
1. Make the page-parts accessible via urls. ( /pagename/partname )
2. Make the snippets accessible via urls.( /snippet/snippetname ...
might clash )
3. Have a method on PagePart which'll determine if their rendered
context is dynamic or not. (I.e. if it depends on the clock, or on outer
datasource then dynamic)
4. Let the controller set up an ssi object, give it the url ( Ssi.new
url ), put it on stack
5.a When a part/snippet/layout called for rendering and it is dynamic
ssi.append "<!--#include #{url-of-this-part-or-snippet}-->", and push a
new ssi on the stack with nil url (of course that stack can be the
callstack but that's intursive)
After the normal rendering write the popped new ssi to the public dir if
it has an url
5.b else append the render to the top ssi object ( ssi.append context ),
and give it a url if that's nil
I expect to get an ssi file that includes in the dynamic parts, which
made accesible via urls. Those dynamic radiant pageparts can in turn
include in more static ssi files, and those can include in dynamic parts
again... which isn't desirable if slow, but I'll fight that another day.
This is all possible because apache2 can do ssi with our radiant output
too (filter).
I also expect this to be a rocket compared to what we have now.
If I want to control the outgoing header I'd have to mark the outer page
dynamic so at first it can have-a-go and do the filtering only with its
output, but this is in the clouds, I can't see if this can be done or
not. Apache might just hate us trying to set a header once he already
sent out one because of the ssi. I'll have to try that.
Overhead: little. Dynamic things push and pop once, nothing else. Static
things do write things twice ( one for ssi and one for response ) but
then in return it will not run again since the ssi will take over the
load.
Dependency: when we edit in admin, delete all corresponding ssi... which
is not obvious a tiny bit, I should have left some breadcrumbs behind
when appended the just edited part to an ssi. Those dependent ssis now
need to be deleted.
I wish I could do all this in an extension, but I'm so far unable to
override anything in Page. If someone with a strong ruby-kungfu can help
me...
Until then I'll just extend it.
Laszlo
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant