Constantine, do you mind sharing what and how you are serializing things
with protocol buffers? perhaps we can adapt what you are doing into the
web2py GAE caching core.
JT - thanks for the nice writeup. i'm working on optimizing some web2py
apps for customers now, and should be using your te
>not picklable
there is a way to serialize with protocol buffers. I am using it in my
code but it better be implemented in the web2py core as a 'gae' dependency.
Thanks everyone for your excellent help!
I posted an account of enabling caching with web2py on GAE in a blog
post here:
http://opensourcebroadcasting.blogspot.com/2011/11/web2py-caching-and-google-app-engine.html
All the best, JT
On Tue, Nov 22, 2011 at 8:34 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> . I have never tried it on GAE
I have a select cache on my app, works locally, but fails on GAE. It does
not raise any exception but does not cache anything, and I only realized it
does not works when I see
hmmm, i've never known GAE to cache selects. at one point i thought the
book said as much, now it simply says:
"The results of a select are complex, un-pickleable objects; they cannot be
stored in a session and cannot be cached in any other way than the one
explained here."
and i believe that
select(cache) does not serielizes Rows but the dictionary returned by
the select. I have never tried it on GAE. For sure you cannot cache in
run but it should be possible to cache.memcache. If that does not work
it is because the datastore returns a type that is not serializible.
On Nov 22, 3:26 p
actually, unless something changed on on GAE, select caching does not work
because the rows object is not picklable.
the @cache decorator caches the dict that you return to the view, not the
rendered view. if something in that dict is not picklable (say a rows
object) the cache will fail. ant
How about:
return response.render(dict(pledges=pledges))
An alternative is just to cache the select instead of the whole view:
pledges=db((db.pledge.segment==segment_id) &
(db.pledge.read == False)).select(orderby=~db.pledge.created_on,
cache=(cache.ram, 5))
In that case, you would remo
actually i would recommend that this be removed from web2py. Ikai Lan (app
engine system developer at google) says they can detect those dummy requests
and punish apps that do that (was chatting with him at a conference last
fall). i would instead pay the modest $9 a month for "always on".
or
9 matches
Mail list logo