Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache process.env #150

Closed
tjwebb opened this issue Apr 18, 2016 · 0 comments · Fixed by #152
Closed

cache process.env #150

tjwebb opened this issue Apr 18, 2016 · 0 comments · Fixed by #152

Comments

@tjwebb
Copy link
Member

tjwebb commented Apr 18, 2016

Issue Description

process.env results in an OS call for every access, and can be very slow if called on every request to check environment for some reason. Typical usage should recommend that process.env be only used in the configs (i.e. in the filers under config/) but there could be scenarios where a user may want to access it directly.

Caching it would also allow the system to throw an error if the user (or malicious code) attempts to modify process.env during runtime.

See:

Environment

  • node version: all
  • trails version: all
  • operating system: all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant