Hi Krista root = cache.ram(str(tree_id), make_root, t0)
get a large t0, like 10**9 the function make_root will only be called the first time. Does it make sense? On Jul 9, 1:52 pm, Krista Larson <klarso...@msn.com> wrote: > Hello, > > I have a large tree of data that I build in my application which is > manipulated by the user through a web interface. Instead of rebuilding this > tree each time the user makes a change, it would be much simpler to just > store it in the cache. There is no expiration time and I would not want a > controller to be re-executed, i.e. rebuild the same tree. > > This is where I get stuck - how do I get the cached tree without creating a > new 'root'? > root = cache.ram(str(tree_id), lambda:root, 5000) > > Thanks! > Krista > > _________________________________________________________________ > Windows Live™ SkyDrive™: Get 25 GB of free online > storage.http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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 -~----------~----~----~----~------~----~------~--~---