-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DPL CCDB: handle the Cache-Valid-Until header #12801
Conversation
REQUEST FOR PRODUCTION RELEASES:
This will add The following labels are available |
18c9baa
to
f355f45
Compare
@@ -240,6 +250,7 @@ auto populateCacheWith(std::shared_ptr<CCDBFetcherHelper> const& helper, | |||
helper->mapURL2UUID[path].lastCheckedTF = timingInfo.tfCounter; | |||
if (etag.empty()) { | |||
helper->mapURL2UUID[path].etag = headers["ETag"]; // update uuid | |||
helper->mapURL2UUID[path].cacheValidUntil = headers["Cache-Valid-Until"].empty() ? 0 : std::stoul(headers["Cache-Valid-Until"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that this "Cache-Valid-Until"
is provided not at the 1st query (with empty etag) and at the 1st query with valid etag (actually at the 2nd one, see my email to @costing ).
So, there is no point in its caching here, instead should be cached as done here
helper->mapURL2UUID[path].cacheValidUntil = headers["Cache-Valid-Until"].empty() ? 0 : std::stoul(headers["Cache-Valid-Until"]); |
} |
else {
helper->mapURL2UUID[path].cacheValidUntil = headers["Cache-Valid-Until"].empty() ? 0 : std::stoul(headers["Cache-Valid-Until"]);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shahor02 updated.
db18c53
to
db34e43
Compare
This will not recheck the etag and consider the cache valid until the timestamp in milliseconds in the Cache-Valid-Until is not passed by the data timestamp.
Passes the full system test. |
DPL CCDB: handle the Cache-Valid-Until header
This will not recheck the etag and consider the cache valid until
the timestamp in milliseconds in the Cache-Valid-Until is not passed
by the data timestamp.