cache.ram with nginx/uwsgi

38 views
Skip to first unread message

tim.n...@conted.ox.ac.uk

unread,
Sep 13, 2018, 11:21:35 AM9/13/18
to web2py-users
Is it possible for cache.ram to work if running on nginx/uwsgi, particularly with multiple processes?

I don't really care if each of my processes (4) winds up with its own cache in memory, but they seem to expire very quickly.  

Moving to cache.disk or Redis may be the way to go, but if simple ram caching can work, I'd sooner go that route.

Anthony

unread,
Sep 13, 2018, 11:27:42 AM9/13/18
to web2py-users
You can use cache.ram, but each process will have its own cache. That shouldn't affect expiration at all, though, as with cache.ram, the expiration is determined at retrieval time, not at the time of the initial write, and cache keys are not automatically purged after some period. Of course, in one request, you might put something in the cache of one process, and the very next request might hit a different process and therefore not have access to that cached item (so it will then be written to the cache of the second process).

Anthony
Reply all
Reply to author
Forward
0 new messages