@Niphold, I just send a PR with improvements mainly docstring and PEP8 over cache redis contrib...
:D Richard On Thu, Jan 14, 2016 at 11:12 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > This is true for any other cache except cache.ram right? > > If so, there is no gain with cache.redis the way I use it... > > @Anthony, are you sure about the issue with uwsgi/nginx and cache.ram dict > update? > > I guess, I should start to look at how to get rid of these global dict > while not degrading system performance. There surely place where I use > these global vars that wouldn't suffer from a little query to the backend, > but for grid where the performance was the greatest or simplifying code was > acheive with those it will be difficult to stop using them... > > Thanks > > Richard > > > On Thu, Jan 14, 2016 at 10:39 AM, Anthony <abasta...@gmail.com> wrote: > >> So, my main issue with both cache.ram and cache.redis is that new id >>> representation never get added to the dict "permanently". In case of >>> cache.ram, the issue may come from what Anthony explain because I use >>> uwsgi/nginx. But I have made some test with redis and the issue still >>> there, but may still be there for a differents reasons, I don't know. I >>> mean if I update the Redis cached dict from shell, and I try to retrieve >>> the representation passing the key to the dict it works, but it looks like >>> this only works in shell. In case of Redis, I may have to recompute the >>> whole dict base on what you explain, which will not provide any performance >>> improvement if it the case, because what I try to prevent it exactly the >>> creation of the dictionary which requires a lot of computing for nothing >>> each time a new record get created. There maybe something I don't >>> understand about how to refresh Redis cache or in what you explained. >>> >> >> The point is that when you retrieve something cached anywhere but RAM, >> you are getting a *copy* of the object. If you then update that copy in >> your Python code, that does nothing to update the value that is stored in >> the cache. So, if you want to update the cached value, you have to >> explicitly put the new copy of the entire object back into the cache. >> >> 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 web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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.