One thing which I just stumbled across too is that loading the Cheetah
templates from within writeHTML() or an action method clobbers the
caching available from within Cheetah.
If the servlet has the templates initialized outside of that though,
then the same templates are kept around, and caching works. Of course
you might still use the servlet for more important dynamic processing,
but the Cheetah cache is still nice for those bits where you have
repeated bits of fluff across different pages. Simple example follows:
======================================================================
from basic import basic # Note to self, use better class names next time
from test import test
from WebKit.Page import Page
templates = {'basic':basic(),'test':test()}
class index(Page):
def writeHTML(self):
tmpl = templates['basic']
self.writeln(tmpl)
def actions(self):
return['foo']
def foo(self):
tmpl = templates['test']
# insert paramater info here
self.writeln(tmpl)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss