I use the example from the book and change the time to 60 seconds:

​def cache_in_ram():
    import time
    t = cache.ram('time', lambda: time.ctime(), time_expire=60)
    return locals()

​Now I call this function rapidly during the cache-time (60 seconds). It
should show always the same time - but it does not! On my machine it shows
4 different times.

If I change from cache.ram to cache.disk every calls looks like expected.
Therefore  I think it is a problem of the RAM-management of the virtual
server.

Next problem:

I use routes.py for a simle rerouting. After some modifications I press the
reload button for the routes and try the new routes. And now sometime the
new routes work, sometime the old routes. I push the reload-button more
than 30 times and now every call goes to the new routes. It seems that this
is similar to the cache.ram problem. I did not find whether routes uses
cache.ram, but if it does: is it possible to change it to cache.disk?

Any ideas?

Regards, Martin

-- 
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