I tried to move the part which asks session for the ctime value into a model:
def sestime(): return session.ctime In controller there is: class Blah: def sessiontime(self): return sestime() def cache_test(): import time session.ctime = time.ctime() def blah(): return Blah() b = cache.ram('blah',blah,30) return dict(cached=b.sessiontime(), current=session.ctime) And still the same, the cached and current differ. The old session is wired into the cache somehow, hmmm.. The examples are silly, of course, just to show the problem. I wish to use the cache to store complex objects, constructed on results of multiple queries. The objects have various methods operating on their properties in context of session. Once I cache the objects (to avoid tons of queries), my program breaks :( David -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.