title: Using TTLCache :: cachetools
body: <p>I want to use cachetools, when I use below codes in a python file, the cache never expired:</p>
  
  <pre><code>from cachetools import TTLCache
  cache = TTLCache(maxsize=10, ttl=6)
  cache['a'] = "b"
  print(cache['a'])
  
  </code></pre>
  
  <p>But when I use from python console it expires after 6 seconds. I'm confused about this module's logic. Any advice would be appreciated.</p>