Flask - Middleware and Extensions
This Flask code raises an error when caching is applied:
What is the likely cause of the error?
from flask import Flask
from flask_caching import Cache
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'SimpleCache'})
@app.route('/time')
@cache.cached(timeout=5)
def get_time():
return time.ctime()
What is the likely cause of the error?
