ocket8888 commented on a change in pull request #5910:
URL: https://github.com/apache/trafficcontrol/pull/5910#discussion_r644989456



##########
File path: blueprints/refetch-invalidation.md
##########
@@ -0,0 +1,240 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+# Add REFETCH capability option for Content Invalidation
+
+## Problem Description
+
+Currently, within ATC, there is a concept of Invalidation Jobs. These 
Invalidation Jobs give a user the ability to queue an invalidation for a 
resource, primarily based on regular expressions. The invalidation is gathered 
and treated as though there was a cache **STALE**, allowing the cache to query 
the origin server to **REFRESH** the resource. However, should the cache policy 
still be incorrect or misconfigured, the resource could be updated on the 
origin server, but the cache will still receive a 304 - Not Modified HTTP 
status response.
+
+## Proposed Change
+
+ To address this potential conflict, a proposal to add **REFETCH** as an 
option for Invalidation Jobs. This will then be treated by caches as a **MISS** 
(rather than a **STALE**), thusly allowing the cache to retrieve the resource 
regardless of cache policies. The original **REFRESH**/**STALE** will be the 
default option, where **REFETCH**/**MISS** will be the addition.
+
+### Traffic Portal Impact
+
+##### Create and Update
+Traffic Portal will need to update the Invalidation Job to account for the 
different options. When creating an Invalidation Job both options will need to 
be present (Perhaps a radio button? Default will be the original **REFRESH**).
+
+Tooltips should be added to ensure an understanding of this feature at a high 
level.
+
+##### Read
+When displaying the information, the **Invalidation Requests** table current 
shows the `Parameters` field, so the display will be straight forward with no 
manipulation.
+
+However, we derived and calculate the expiration field based on the TTL. This 
code will need to be modified to account for the additional information 
contained in the `Parameters` field.
+
+### Traffic Ops Impact
+
+Both the API and the database schema will likely be updated, which in turn 
will result in changes downstream (such as T3C/ORT, clients) as well.
+
+#### REST API Impact
+
+No new endpoints will be required. However the current invalidation job will 
now include an optional field during `Create`. Invalidation jobs are added by 
submitting a POST to the jobs endpoint. 
+
+**POST** /api/4.0/jobs
+
+##### Current Request
+
+Body:
+```
+{"startTime":"2021-06-02T15:23:21.348Z","deliveryService":11,"regex":"/path/.*\\.jpeg","ttl":24}

Review comment:
       should also syntax highlight as JSON




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to