On Thu, 15 Jun 2000, Dr. Ross Lazarus wrote:
import Globals ... o = getattr(self,thingtorender) rendered_doc = o(client=o,REQUEST=REQUEST,globals=globals()) ...
A 'call of nonfunction' type error, as far as thing to render is index_html (DTMLMethod). Anyway, I have tryied to do it in a whole lot of ways, when all I want to do is to copy the behavier of <dtml-var "_.getitem(thing,1)">. Shouldn't be too hard, I thought. But I have no access to that function. Calling self.thing returns None, calling self.aq_parent.thing returns an html_quoted version of the doument_src. The real problem, come to think of it, is that if I call self.aq_parent.thing.__call__() I get the thing, but with a key error for the standard_html_header. So, I don't have access to the namespace? or the aquisition engine doesn't work this way?
Incidentally, why bother making a cache inside of zope? There are perfectly good ones already available out there like squid. Wouldn't it be easier to just dump the result from every query you encounter into a disk file.
It's just too dinamic...I mean, we have an index_html on the root wich serves everything and everyone. Then we have thematic areas with top and bottom bars wich differ from each other, than there's the real info being queried wich appears in the middle "frame", but all this without frames, with only a base table structure on the root index_html. Btw, data can change very rapidly, and so the cache was not to avoid charging zope with the request load, but to avoid having to process the pages, wich are rather complicated, everytime it gets requested. And we are getting 1000+ hits per minute, so a one minute cache with a pre-rendered page for us would do fine. We try to avoid external help on this.
Given that there are tools to do this, it just might be easier with static html than with live zope....
We all had experience in developing with Apache/Perl or Apache/PHP3 and ok, it works, it's fast and all that. But seriously, developing a portal without zope just seems impossible now, knowing that what took me 1-2 weeks to develope before can now be done in a days work, and all without mixing functional code and aspect. Wow, we can even undo! Can't beat this, I'm afraid. :) -- Carlos Neves cneves@ruido-visual.pt