say you have a function f() and you want to cache it for 3000ms. You do instead of calling
f() you call cahe.ram('somekeyword',f,3000) This way you can cache anything but database connections. You can cache quesries with db(...).select(...cache=(cache.ram,3000)) More examples are on the docs page. Massimo On Apr 22, 12:13 pm, Pynthon <forumx...@gmail.com> wrote: > And the cache function is that easy to do? Is W2P also faster then > Django? > > On 22 apr, 19:01, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > If you store everything in the database the only bottleneck is the > > database. The web2py DAL does not add a significative overhead. You > > can have as many servers you need under a load balancer. Those web > > server can work independently (other than for the database) thus > > providing scalability. > > > You cannot separate the issue of scalability from the issue of speed. > > > - web2py is much faster than rails. If you try them both you will feel > > the difference. > > - web2py supports connection pools > > - You can improve web2py speed by storing uploaded files in a upload > > folder (the default) and make it a shared folder. This will reduce > > database load but does not necessarily reduce network load. > > - You can improve speed by not using sessions. > > - You can improve speed by caching page in ram or memcache. > > > I am sure other uses will have experiences to share. > > > Massimo > > > On Apr 22, 11:43 am, Pynthon <forumx...@gmail.com> wrote: > > > > Hello > > > > Ruby on Rails is sometimes hard to scale I heard. How is this with > > > W2P? > > > > Thanks > > > Pynthon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---