thadeusb/flask-cache — pull request #17 by tehasdf (2012-02-16 02:57:09+00:00)
Title: Fix make_cache_key to work with functions

[The function make_cache_key](https://github.com/thadeusb/flask-cache/blob/master/flaskext/cache/__init__.py#L181) first checks if '%s' is in key_prefix, then checks if key_prefix is callable. This causes a TypeError when passing a function, because functions cannot be iterated over. The possible workaround is to pass an instance of a class that is both iterable and callable as the key_prefix, although the obvious fix is to check if key_prefix is callable first.