definitely a bug. a PR is on the way.

On Friday, October 7, 2016 at 8:49:45 PM UTC+2, Niphlod wrote:
>
> ok, it's valid syntax. will investigate...
>
> On Friday, October 7, 2016 at 7:04:51 PM UTC+2, MDSIII wrote:
>>
>> cval = dict(request.vars)
>> cval.update(request.vars)
>> cache.ram('agent',
>>          lambda: cache.disk('agent', lambda :cval, time_expire = 0),
>>          time_expire = 0)
>>
>> I realize this is sort of rediculous code but it shows all assignment 
>> operations to the object "cval" that happen before it is written to cache.
>>
>>
>> On Friday, October 7, 2016 at 4:12:22 AM UTC-7, Niphlod wrote:
>>>
>>> how do you store a dict in cache.disk ?
>>>
>>> On Friday, October 7, 2016 at 8:59:34 AM UTC+2, MDSIII wrote:
>>>>
>>>> When I store a dict in cache.disk and then request 
>>>> <myapp>/appadmin/ccache I'm getting a key error:
>>>>
>>>> Traceback (most recent call last):
>>>>   File "C:\repos\TCL\web2py\gluon\restricted.py", line 227, in 
>>>> restricted
>>>>     exec ccode in environment
>>>>   File 
>>>> "C:\repos\TCL\web2py\applications\timecardlynx\controllers/appadmin.py", 
>>>> line 703, in <module>
>>>>     
>>>>   File "C:\repos\TCL\web2py\gluon\globals.py", line 412, in <lambda>
>>>>     self._caller = lambda f: f()
>>>>   File 
>>>> "C:\repos\TCL\web2py\applications\timecardlynx\controllers/appadmin.py", 
>>>> line 469, in ccache
>>>>     disk['hits'] = value[1]['hit_total'] - value[1]['misses']
>>>> KeyError: 'hit_total'
>>>>
>>>> Is this known?
>>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to