I'm building a system which needs to carry out actions via the Facebook Graph QPI on behalf of a user.
I was planning on reusing a Client instance inside an express route handler, which could be hit by any user. Is this safe, or should I create a new Client instance per request? (By 'safe', I am wondering if instance variables are altered in a Client instance that might affect future requests).
I'm building a system which needs to carry out actions via the Facebook Graph QPI on behalf of a user.
I was planning on reusing a Client instance inside an express route handler, which could be hit by any user. Is this safe, or should I create a new Client instance per request? (By 'safe', I am wondering if instance variables are altered in a Client instance that might affect future requests).
In other words, should I do this:
Or this?