"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 selec
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 the
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)
Ok, changing all my selects to cacheable=False it works on .disk, redis and
memcache.
Even on the rows where I am not using the .find() and .exclude() methods
the cache are failing.
If do
{{for row in cached_rows:}}
{{pass}}
it gives me nothing..
Also {{if cached_rows:}} returns always False.
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.
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
The same problem without cacheable
--
I'm getting weird behaviours trying to reproduce if you remove
cacheable=True will the find() method work or not ?
On Thursday, September 13, 2012 8:53:16 PM UTC+2, rochacbruno wrote:
>
> Yes, it raises the same error when using cache.disk, so I think for now we
> should include a note on /b
Yes, it raises the same error when using cache.disk, so I think for now we
should include a note on /book.
and I will try to emulate the .find .exclude and .sort externally using
listcomprehension or map.
--
a little pointer. find(), exclude(), etc are methods of a "rows"
object. Can you please try to cache using cache.disk ?
If the error is the same, this is the "unfair" difference from cache.ram
(that can cache pointers to a functions, objects, singletons, etc) vs all
the other methods that ha
I am not sure. Please open a ticket do it gets tracked.
On Sep 13, 2012, at 9:03 AM, Bruno Rocha wrote:
> I noted that this happens with memcached too.
>
> 'list' object has no attribute 'find'
>
> My cached .select(cache=(cache.memcache, 1200)) is retrived as a list.
>
> Function argument li
11 matches
Mail list logo