Flask - Middleware and Extensions
Given this Flask code snippet using Flask-Caching, what will be printed on the second request to
/time within 10 seconds?
from flask import Flask
from flask_caching import Cache
import time
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/time')
@cache.cached(timeout=10)
def get_time():
return str(time.time())
# Assume the first request prints 1680000000.0