Skip to content

Commit

Permalink
Issue webcompat#609 - Implements cache policies on HTML views
Browse files Browse the repository at this point in the history
  • Loading branch information
karlcow committed Mar 9, 2017
1 parent 8e20552 commit d9acea4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webcompat/views.py
Expand Up @@ -7,7 +7,6 @@
import json
import logging
import os
import urllib

from flask import abort
from flask import flash
Expand All @@ -23,6 +22,7 @@
from form import PROXY_REPORT
from helpers import add_csp
from helpers import add_sec_headers
from helpers import cache_policy
from helpers import get_browser_name
from helpers import get_form
from helpers import get_referer
Expand Down Expand Up @@ -147,6 +147,7 @@ def index():


@app.route('/issues')
@cache_policy(private=True, uri_max_age=0, must_revalidate=True)
def show_issues():
'''Route to display global issues view.'''
if g.user:
Expand Down Expand Up @@ -205,6 +206,7 @@ def create_issue():


@app.route('/issues/<int:number>')
@cache_policy(private=True, uri_max_age=0, must_revalidate=True)
def show_issue(number):
'''Route to display a single issue.'''
if g.user:
Expand Down Expand Up @@ -283,6 +285,7 @@ def get_test_helper(filename):


@app.route('/about')
@cache_policy(private=True, uri_max_age=0, must_revalidate=True)
def about():
'''Route to display about page.'''
if g.user:
Expand All @@ -291,6 +294,7 @@ def about():


@app.route('/privacy')
@cache_policy(private=True, uri_max_age=0, must_revalidate=True)
def privacy():
'''Route to display privacy page.'''
if g.user:
Expand All @@ -299,6 +303,7 @@ def privacy():


@app.route('/contributors')
@cache_policy(private=True, uri_max_age=0, must_revalidate=True)
def contributors():
'''Route to display contributors page.'''
if g.user:
Expand Down

0 comments on commit d9acea4

Please sign in to comment.