title: Disable cache on a specific page using Flask
body: <p>I have a template showing various entries that the author can edit/delete.
  Users can delete their posts clicking on Delete</p>
  
  <p>After the deletion the user gets redirected to the entries page, but the item is still there, and the page needs to be reloaded again to show the deletion effect.
  If i disable caching the problem disappears, but i really want to have caches in all the other pages...</p>
  
  <p>adding these tags didn't work, i think my browser just ignores them</p>
  
  <pre><code>&lt;meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /&gt;
  &lt;meta http-equiv="Pragma" content="no-cache" /&gt;
  &lt;meta http-equiv="Expires" content="0" /&gt;
  </code></pre>
  
  <p>I'm enabling the cache trough:</p>
  
  <pre><code>@app.after_request
  def add_header(response):    
  response.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'
  response.headers['Cache-Control'] = 'public, max-age=600'
  return response
  </code></pre>
  
  <p>Is there a way I can disable it for a specific page?</p>
  
  <p><strong>edit</strong></p>
  
  <p>as suggested i tried using a wrapper:</p>
  
  <pre><code>def no_cache(f):
      def new_func(*args, **kwargs):
          resp = make_response(f(*args, **kwargs))
          resp.cache_control.no_cache = True
          return resp
      return update_wrapper(new_func, f)
  </code></pre>
  
  <p>and wrap the page i want wihtout cache in a @no_cache decorator, still had no luck...</p>