def cache_result(callable, cache_key, timeout):
    def inner(*args, **kwargs):
       result = cache.get(cache_key)
       if result is None:
           result = callable(*args, **kwargs)
           cache.set(cache_key, result, timeout)
       return result
    return inner