@app.route('/test2')
@cache.cached(timeout=50, key_prefix=make_cache_key)
def test2():
    a = request.args.get('a')
b = request.args.get('b')
return a + b
flask-cache memoize URL query string parameters as well