title: Caching in-memory with a time limit in python
body: <p>I have a function that returns a list, say list_x.</p>
  
  <pre><code>def result(val):
      ..
      return(list_x)
  </code></pre>
  
  <p>I am calling result() every minute and storing the list.</p>
  
  <pre><code>def other_func():
      #called every minute
      new_list = result(val)
  </code></pre>
  
  <p>I would like to store the value of new_list for an hour (in some sort of in-memory cache may be?) and then update it again, basically call results() after an hour and not every minute.I read about functools.lru_cache but that will not help here I think. Any ideas?</p>