Skip to content
This repository has been archived by the owner on Nov 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1610 from mitchell852/issue1608
Browse files Browse the repository at this point in the history
uses new parameter that dictates how long an invalidate content reque…
  • Loading branch information
Dewayne Richardson authored Jul 18, 2016
2 parents 44305d4 + 50f24af commit 5035612
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2015 Comcast Cable Communications Management, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied

DELETE FROM parameter
WHERE parameter.name = "ttl_max_hours";

-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2015 Comcast Cable Communications Management, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied

DELETE FROM parameter
WHERE parameter.name = "ttl_min_hours";

-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back
2 changes: 1 addition & 1 deletion traffic_ops/app/lib/UI/ConfigFiles.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ sub regex_revalidate_dot_config {

my %regex_time;
my $max_days =
$self->db->resultset('Parameter')->search( { name => "ttl_max_hours" }, { config_file => "regex_revalidate.config" } )->get_column('value')->first;
$self->db->resultset('Parameter')->search( { name => "maxRevalDurationDays" }, { config_file => "regex_revalidate.config" } )->get_column('value')->first;
my $max_hours = $max_days * 24;
my $min_hours = 1;

Expand Down

0 comments on commit 5035612

Please sign in to comment.