Skip to content
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

FastbootAdapter requires maxAge to be set #383

Closed
billdami opened this issue Aug 5, 2020 · 2 comments · Fixed by #427
Closed

FastbootAdapter requires maxAge to be set #383

billdami opened this issue Aug 5, 2020 · 2 comments · Fixed by #427
Labels

Comments

@billdami
Copy link

billdami commented Aug 5, 2020

Not sure if this was intentional, but it looks like the shoebox data expiration feature that was added via #369 that was added in the latest release causes the adapter to never use cached request data if a storefront.maxAge environment config value is not set. The current documentation makes it sound like this configuration is optional, which, imo, it probably should be. E.g.

isDateValid(createdString, maxAgeMinutes) {
    return !maxAgeMinutes || (new Date() - new Date(createdString)) / 1000 / 60 < maxAgeMinutes;
}
@billdami billdami changed the title FastbootAdapter requires maxAge to be set FastbootAdapter requires maxAge to be set Aug 5, 2020
@st-h
Copy link
Contributor

st-h commented Aug 5, 2020

@billdami thanks. I thought I checked that it keeps the previous behaviour - but looking at the code now, I think you are right. I think your fix is reasonable. Could you please submit a PR?

@ryanto
Copy link
Member

ryanto commented Feb 26, 2021

Released as 0.18.1 thanks to @xg-wang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants