Hi Massimo,
i touched it to cache function instead of constructor:
class Blah:
def sessiontime(self):
return session.ctime
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 result is the same.
David
On Mar 28, 4:39 pm, mdipierro <[email protected]> wrote:
> No. and frankly I do not understand why it behaves it this way. You
> are doing something I never thought of: caching a constructor instead
> of a function. I will check this.
>
> Massimo
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.