On Tuesday, March 15, 2016 at 1:36:19 PM UTC-4, Alex wrote: > > Do you know why there is a difference if the dict is accessed inside or > outside a controller function? > > Are there any (fast) alternatives to calculate a dict hash? >
Are you looking for an alternative way to hash the session? The problem is the session currently allows any pickleable object, so we can't pick a serialization format that excludes anything pickleable (e.g., JSON would not work). > The workaround for me would be to not access auth.user_groups and use > fields in the user table instead (e.g. auth.user.is_admin) which does not > change the session. If there is no good solution and the code stays > unchanged I think this should definitely be mentioned in the book. If there > are many requests the performance loss is probably not insignificant since > the session is written for every request. > Any ideas? Anthony -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

