Ring: Advanced cache interface for Python
Every example seems to follow this pattern<p><pre><code>  client = pymemcache.client.Client(('127.0.0.1', 11211))  #2 create a client

  # save to memcache client, expire in 60 seconds.
  @ring.memcache(client, expire=60)  #3 lru -> memcache
  def get_url(url):
      return requests.get(url).content

</code></pre>
How are you supposed to configure the client at 'runtime' instead of 'compile time' (when the code is executed and not when it's imported)?<p>Careful placement of imports in order to correctly configure something just introduces delicate pain points. It'll work now, but an absent minded import somewhere else later can easily lead to hours of debugging.