I do not know how to make WebKit & Cheetah to use cache. I am using
mod_webkit csv. CacheServletClasses and CacheServletInstances are set
to 1. My first try was:

TestCache.py:

import time
from WebKit.Page import Page
from Cheetah.Template import Template
class TestCache(Page):
    def writeHTML(self):
        t =  time.strftime('%H:%M:%S', time.localtime(time.time()))
        tmpl = Template(file='TestCache.tmpl', searchList=[{'t':t}])
        self.writeln(tmpl)

TestCache.tmpl:

<html>
<body>
#cache
t=$t
#end cache
</body>
</html>

But it does NOT work because every refresh of the page I get the new
values. It should be the same values if cache works, isn't it? I have
also tried another way:

TestCache.tmpl:

from WebKit.Page import Page
from Cheetah.Template import Template
class TestCache(Page):
    def writeHTML(self):
        tmpl = Template(file='TestCache.tmpl')
        self.writeln(tmpl)

TestCache.tmpl

<html>
<body>
#import time
#cache
#set $t =  time.strftime('%H:%M:%S', time.localtime(time.time()))
t=$t
#end cache
</body>
</html>

Unsuccesfull. :( Nothing was changed.What am I doing wrong??

-- 
JZ



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to