Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
2667ea16
Unverified
Commit
2667ea16
authored
2 years ago
by
Chuck Grindel
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: update cache record TTL to not account for Daylight Saving time (#21389)
parent
bca8c202
Branches
Branches containing commit
Tags
32.154.3
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/util/github/graphql/cache-strategies/package-cache-strategy.ts
+3
-1
3 additions, 1 deletion
...github/graphql/cache-strategies/package-cache-strategy.ts
with
3 additions
and
1 deletion
lib/util/github/graphql/cache-strategies/package-cache-strategy.ts
+
3
−
1
View file @
2667ea16
...
...
@@ -17,7 +17,9 @@ export class GithubGraphqlPackageCacheStrategy<
):
Promise
<
void
>
{
if
(
this
.
hasUpdatedItems
)
{
const
expiry
=
this
.
createdAt
.
plus
({
days
:
AbstractGithubGraphqlCacheStrategy
.
cacheTTLDays
,
// Not using 'days' as it does not handle adjustments for Daylight Saving time.
// The offset in the resulting DateTime object does not match that of the expiry or this.now.
hours
:
AbstractGithubGraphqlCacheStrategy
.
cacheTTLDays
*
24
,
});
const
ttlMinutes
=
expiry
.
diff
(
this
.
now
,
[
'
minutes
'
]).
as
(
'
minutes
'
);
if
(
ttlMinutes
&&
ttlMinutes
>
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment