Description
I noticed that whenever a user authenticates with Parse.User.loginIn
, they're added to the users
array in cache.js and they're only ever removed when a user forcefully signs out (which in our case, is quite rare) or when the node process restarts/crashes.
This might be fine for light traffic loads or for development use — but I can see this potentially becoming a problem for apps with large amounts of traffic as it is likely to gobble up unnecessary RAM. It may also create inconsistency between load balanced nodes/dynos.
I'm proposing at some point in the future (probably not as a priority) we make the switch to Redis or memcached to hold these variables somewhere consistent (especially if load balancing traffic etc). This might also pave the way for some more advanced query caching in the future too to minimise hits to the popular database for queries that don't often change. Heroku has quite a few hosted Redis/Memcached options so it should be fairly trivial for most users to optionally switch this behaviour on if they want.
Happy to contribute but thought I'd open up an issue first so it can be discussed and tagged up as up for grabs.