title: Remove all matching keys from Django cache
body: <p>I need to iterate through my server's cache, which is a <code>LocMemCache</code> object, and remove every key in the cache that begins with the string <code>'rl:'</code>. From what I understand, the only functions that the caching API django provides are get, set, and delete. Here is a rough example of what I am trying to do:</p>
  
  <pre><code>def clear_ratelimit_cache():
      if any('rl:' in s for s in cache.get(s)): 
          log.info(
              'FOUND SOMETHING') 
          cache.delete(*something else here*)
  </code></pre>
  
  <p>Trying to do this, however, gives me a <code>NameError</code>, stating that <code>global name 's' is not defined</code>. Also it must be noted that the cache is not iterable. Has anyone worked with the cache in a similar manner, and has a suggestion?</p>