Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
remove unnecessary call to revalidate
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralph Cowling committed Jun 4, 2014
1 parent 7ff610c commit 3885e07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backdrop/read/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def fetch(data_set_config):
"Data may be subject to change or be inaccurate.")
response = jsonify(data=data, warning=warning)
# Do not cache unpublished data-sets
response.headers['Cache-Control'] = "no-cache, must-revalidate"
response.headers['Cache-Control'] = "no-cache"
else:
response = jsonify(data=data)
# Set cache control based on data-set max_age
Expand Down
2 changes: 1 addition & 1 deletion tests/read/test_read_api_service_data_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ def test_max_age_is_2_min_for_realtime_data_sets(self):
@fake_data_set_exists("data_set", data_group="some-group", data_type="some-type", raw_queries_allowed=True, published=False)
def test_cache_control_is_set_to_no_cache_for_unpublished_data_sets(self):
response = self.app.get('/data/some-group/some-type')
assert_that(response, has_header('Cache-Control', 'no-cache, must-revalidate'))
assert_that(response, has_header('Cache-Control', 'no-cache'))

0 comments on commit 3885e07

Please sign in to comment.