title: How to create a Global Variable in elixir Module
body: <p>I have the following code in elixir:</p>
  
  <pre><code>def get_trackerid(imei) do
    client = get_new_client()
    {:ok, result} = :cqerl.run_query(client, "SELECT * FROM trackers_by_imei where imei = \'#{imei}\';")
    row = :cqerl.all_rows(result)
  end
  </code></pre>
  
  <p>Now, now many functions are calling get_trackerid function and everytime the function is called, a call to database is made.</p>
  
  <p>Is there a way to write a function in elixir such the result is stored in a local variable. So, when the next time trackerid for the same imei is requested, I can get the data from the local variable itself.</p>
  
  <p>I think there is no concept of global variable in elixir, so that is not an option, right?</p>