many thanks - a great help as always!
Andy
On Wednesday, February 20, 2013 2:43:31 AM UTC+4, howesc wrote:
>
> sorry about my typo. i can never remember as_dict!
>
> for my views i generally access the objects as dictionaries, using the
> ['key'] notation. if you like you may cast the items ba
sorry about my typo. i can never remember as_dict!
for my views i generally access the objects as dictionaries, using the
['key'] notation. if you like you may cast the items back to web2py
Storage objects, which will then have accessors like the Row object they
were (Row is an extension of S
Thanks for the input.
Niphlod: I tried cacheable=True but seemed to make no difference on GAE SDK
Christian: adding ".as_dict()" rather than the suggested ".to_dict" on the
select statement does seem to work. The caching code then becomes:
students = cache.ram('students',
cacheable=True is a newish option to selects right? i've not yet used
itand had forgotten about it.
cfh
On Monday, February 18, 2013 7:17:02 AM UTC-8, Niphlod wrote:
>
> cacheable=True does not help ?
>
> On Monday, February 18, 2013 4:11:13 PM UTC+1, howesc wrote:
>>
>> ah yes
>>
>> th
cacheable=True does not help ?
On Monday, February 18, 2013 4:11:13 PM UTC+1, howesc wrote:
>
> ah yes
>
> the Rows() object returned from a select is not pickable.
>
> i do this a lot:
>
> students = cache.ram('students',
> lambda:db(db.student.id>0).select(db.stud
ah yes
the Rows() object returned from a select is not pickable.
i do this a lot:
students = cache.ram('students',
lambda:db(db.student.id>0).select(db.student.id,
db.student.family_name,
...
Thanks for the feedback Christian.
It seems to be this that causes the problem on GAE but works on sqlite:
students = cache.ram('students',
lambda:db(db.student.id>0).select(db.student.id,
db.student.family_name,
Andy,
what is the object that you are trying to store in memcache? this:
PicklingError: Can't pickle : attribute lookup
__builtin__.function failed
implies to me that you are trying to store an object that contains a
function (which is not pickleable).
i can't remember the exact differences,
Hi howesc
The stack trace from the SDK log console is:
ERROR2013-02-16 09:50:09,757 restricted.py:161] Traceback (most recent
call last):
File "/Users/andy/www/web2py/gluon/restricted.py", line 212, in restricted
exec ccode in environment
File
"/Users/andy/www/web2py/applications
sorry, i was unclear
GAE will forcibly evict data when some unpublished limits are reached. i
don't know if these limits are time or space, or a space-time continuum,
but when i was storing sessions in memcache my max life was about 5 mins.
On Friday, February 15, 2013 11:41:30 AM UTC-8, N
on the "too fast eviction" issue, I remember that something was added to
set the default expiration time, a time_expire parameter.
On Friday, February 15, 2013 7:32:42 PM UTC+1, howesc wrote:
>
> i did some grepping of my code and found some things
>
> - it seems that cache.ram is automatica
i did some grepping of my code and found some things
- it seems that cache.ram is automatically set to GAE memcache when you
are using GAE. it's part of the GAE setup web2py does for you.
- the code above looks OK for storing sessions in memcache. FWIW, I gave
up using memcache for sessi
12 matches
Mail list logo