Hi Folks, I have report function that is caching my query, example: def report(): sites=db(db.site.ativo==True).select(db.site.id ,db.site.nome,cache=(cache.ram,6000),cacheable=True) lojas=db(db.estoque.ativo==True).select(db.estoque.id ,db.estoque.nome,cache=(cache.ram,6000),cacheable=True) reports=db(db.report.id >0).select(groupby=db.report.carro,cache=(cache.ram,6000),cacheable=True) if request.vars.filtro_site: # WHEN I USE THIS VARIABLE IT GETS SLOW site=int(request.vars.filtro_site) testdrives=reports.find(lambda row: site in row.contato.site if row.contato.site else None) if request.vars.filtro_loja: # WHEN I USE THIS VARIABLE IT GETS SLOW loja=int(request.vars.filtro_loja) testdrives=reports.find(lambda row: loja in row.contato.loja if row.contato.loja else None) return dict(section='relatorio',testdrives=testdrives,lojas=lojas,sites=sites)
So, when I use "request.vars" and the find function it gets pretty slow, is it using the cache to execute the find function? Most of the time I am getting timeout from the webserver. Regards, Tito -- Linux User #387870 .........____ .... _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:_______ -- 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/groups/opt_out.