title: Does getenv cache the result?
body: <p>I have several calls to <code>getenv</code> in my code(called a lot of times), so I see the potential for an optimization. My question is, does <code>getenv</code> somehow cache the result internally, or does it query the environment variables on each call?</p>
  
  <p>I have profiled the code, <code>getenv</code> is not a bottleneck, but I'd still like to change it if it's more efficient.</p>
  
  <p>As a side question, can an environment variable be changed for a program while it is running? I'm not doing that, so in my case caching the result would be safe, it's just curiosity.</p>