adobe / adobe/helix-shared

tokencache: respect last-modified of s3 cache before updating

Open
#969 0 comments 0 reactions 1 assignee Claimed by @dominique-pfister View on GitHub
Dominant language
JavaScript
Stars
15
Forks
16
Avg merge
23h 18m
Merged PRs (30d)
14

Description

Current situation:
- at time T1, instance A loads the S3 token
- at time T2, instance B loads the S3 token
- instance B refreshes the token, stores it back to S3
- later, instance A also refreshes the token, and **writes it back as well**, thereby overwriting a perfectly valid token stored by instance B

Instead, instance A should check that the `Last-Modified` value of the stored token is still the one it has seen when loading in T1. At least, it should internally store the new `Last-Modified` value, to compare it again when the next refresh happens.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.