Re: [web2py] Re: How to persist session data for user across browsers

2012-09-03 Thread Anthony
You might need to occasionally clear out old data so the cache doesn't grow 
indefinitely.

Anthony

On Monday, September 3, 2012 3:19:17 PM UTC-4, monotasker wrote:
>
> Perfect. Thanks for providing the snippet. I haven't used the cache 
> methods yet, and this saves me a lot of time.
>
> Ian
>
> On Sunday, September 2, 2012 2:28:14 AM UTC-4, rochacbruno wrote:
>>
>> I think you can use cache.
>>
>> user_data = cache.ram("user_data_%s" % auth.user_id, lambda : 
>> dict(field=value, field=value), 86400)
>>
>>
>>

-- 





Re: [web2py] Re: How to persist session data for user across browsers

2012-09-03 Thread monotasker
Perfect. Thanks for providing the snippet. I haven't used the cache methods 
yet, and this saves me a lot of time.

Ian

On Sunday, September 2, 2012 2:28:14 AM UTC-4, rochacbruno wrote:
>
> I think you can use cache.
>
> user_data = cache.ram("user_data_%s" % auth.user_id, lambda : 
> dict(field=value, field=value), 86400)
>
>
>

-- 





Re: [web2py] Re: How to persist session data for user across browsers

2012-09-01 Thread Bruno Rocha
I think you can use cache.

user_data = cache.ram("user_data_%s" % auth.user_id, lambda :
dict(field=value, field=value), 86400)

--