Clean-ish memcached key generation
Based on [snippet #1212](http://djangosnippets.org/snippets/1212/) along with it's comments. Replaced the for loop with translate. example usage: from django.core.cache import cache from mysnippet import cache_key_clean expensive_func = lambda x: 'x{0}x'.format(x) input_string = "I wanted a nice value." key = cache_key_clean(input_string) result = cache.get(key) if result is None: result = expensive_func(input_string) cache.set(key, result)
- memcache
- cache