title: RuntimeError: The session is unavailable because no secret key was set. Set the secret_key on the application to something unique and secret
body: <p>I am making Flask app.
  I wrote this code:</p>
  <pre><code>from flask import Flask, session
  from flask_caching import Cache
  
  app = Flask(__name__)
  cache = Cache(app, config={'CACHE_TYPE': 'simple'})
  
  @app.route('/my-route')
  @cache.cached(timeout=50)
  def my_route():
    id = request.args.get('id')
    schema = Schema({
      Required('id'): All(Coerce(str))
  })
  try:
      schema({'id': id})
  except MultipleInvalid as e:
      str(e)
  
    ans=test(session[‘id’])
    return ans
  
  if __name__ == '__main__':
      app.run(debug=True)
  </code></pre>
  <p>When I run the append access <code>localhost:8000/my-route?id=aDj1948</code>, I get:</p>
  <p><code>RuntimeError: The session is unavailable because no secret key was set.  Set the secret_key on the application to something unique and secret.</code> error.</p>
  <p>I rewrote <code>@cache.cached(timeout=50, key_prefix=make_cache_key)</code>, but same error happens. I do not think I have to set secret key somewhere in the codes, so I really cannot understand what is wrong.</p>
  <p>How should I fix this?</p>
  <p>What is wrong in my codes?</p>