"Rows object, that cached (pickled) returns a list, but it's not "transformed back" to a full Rows object." this is because of legacy pickling code. We can fix it.
On Sep 13, 2012, at 2:44 PM, Niphlod wrote: > doh. found! > maybe it's better to put it in the book. > > cacheable makes the select return a "stripped" Rows object. When you use > cache, if cacheable is False, you store the list of the results, that are > turned into a Rows object "filling" a new empty copy. > So, cacheable=False cached results are then transformed to a full Rows object > (find() works) ... cacheable=False returns a Rows object, that cached > (pickled) returns a list, but it's not "transformed back" to a full Rows > object. > > On Thursday, September 13, 2012 9:33:27 PM UTC+2, Niphlod wrote: > no errors but both (cacheable and not cacheable) are gluon.dal.Rows before > pickling and list after pickle.dumps() > > On Thursday, September 13, 2012 9:18:59 PM UTC+2, Massimo Di Pierro wrote: > try pickle and unpickle this: > rows = db(db.tests.id>0).select(cache=(cache.disk, 200), cacheable=True) > > perhaps something is failing there? > > > On Sep 13, 2012, at 2:14 PM, Niphlod wrote: > >> uhm. web2py 2.0.8 ... this works >> >> rows = db(db.tests.id>0).select(cache=(cache.disk, 200)) >> rows = db(db.tests.id>0).select(cache=(cache.disk, 200)) >> print rows.find(lambda row: row.id == 1) >> >> this don't >> >> rows = db(db.tests.id>0).select(cache=(cache.disk, 200), cacheable=True) >> rows = db(db.tests.id>0).select(cache=(cache.disk, 200), cacheable=True) >> print rows.find(lambda row: row.id == 1) >> >> the same exact thing is happening using cache.redis (cacheable=True doesn't >> work, the other works) >> >> -- >> -- mail from:GoogleGroups "web2py-developers" mailing list >> make speech: web2py-d...@googlegroups.com >> unsubscribe: web2py-develop...@googlegroups.com >> details : http://groups.google.com/group/web2py-developers >> the project: http://code.google.com/p/web2py/ >> official : http://www.web2py.com/ >> >> > > > -- > -- mail from:GoogleGroups "web2py-developers" mailing list > make speech: web2py-develop...@googlegroups.com > unsubscribe: web2py-developers+unsubscr...@googlegroups.com > details : http://groups.google.com/group/web2py-developers > the project: http://code.google.com/p/web2py/ > official : http://www.web2py.com/ > > --