Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Mark existing URL Metrics as stale when a new tag visitor is registered #1705
Mark existing URL Metrics as stale when a new tag visitor is registered #1705
Changes from 14 commits
f7295d8
57b79e1
7b48f26
9999eea
3b01ea2
c801a65
b84f62a
ae708cf
e115134
1cd62c0
cb64e1d
a65fbad
5287f79
86023eb
2eb6d98
2c7aee5
821b48d
52c486f
63758ef
08f8f8a
371e998
ba2ea93
8fe38f7
e6078a9
309f9bd
36cdeca
d1458d8
c4eb613
695eecb
5a36beb
d855ae8
5e39581
a430c56
bcc34c9
4f0ac4c
ae3eab0
a33eb28
d37d671
92dc354
85540e6
731fe91
c3b7344
9fcfb7f
b225fba
7b01e50
4456563
034fe46
02e9759
54183af
6960a28
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
If using hashes, then this would be better as:
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.
I wonder if we should make this just
'etag'
. In HTTP it is "ETag", and a lower case "eTag" feels like it would maybe be something else, like an "electronic tag" or something.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.
Makes sense. Done in 08f8f8a.
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's a bit confusing that this is here rather than (also?) added as
urlMetric.eTag
(orurlMetric.etag
). In the end they will need to be identical of course, so it does make sense. Just an observation. Maybe this should be calledcurrent_etag
to better disambiguate?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.
Renamed the arg in 371e998.
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.
An important point here: similar to the
slug
, i think the etag actually should be hashed:The key reason here is that when expanding the scope here to address the parent issue #1466, there will be much more data to include in the ETag. So I suggest that there be a new function created, like
od_compute_current_etag()
which takes$tag_visitor_registry
as an argument. For now it could look like:Then later when working on #1466 the
$data
can be expanded to include things like the IDs andpost_modified
times for the posts in the loop, what the current queried object is, and so on.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.
Done in 8fe38f7.