thadeusb/flask-cache

key_prefix : Expected type 'str', got '() -> str' instead

Closed this issue · 0 comments

def key_str():
    key = flask.request.path
    return key

@app.route('/get', methods=['get'])
@cache.cached(timeout=300, key_prefix=key_str)
image

when I use

@cache.cached(timeout=300, key_prefix=key_str())
image