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

fix(core/biblio): expire entries based on server response #3747

Merged
merged 3 commits into from
Aug 19, 2021

Conversation

marcoscaceres
Copy link
Member

Closes #3746

@marcoscaceres marcoscaceres merged commit 51312b0 into develop Aug 19, 2021
@marcoscaceres marcoscaceres deleted the biblio-cache branch August 19, 2021 06:03
if (isInDB) {
const entry = await this.get(type, details.id);
if (entry?.expires < Date.now()) {
const { store } = db.transaction(type, "readwrite");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't we suppose to await tx.done? Maybe db.objectStore would be nicer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't we suppose to await tx.done?

I don't think it has a .done()? is that something Jake added to the library?

Maybe db.objectStore would be nicer?

sorry, not sure what you are suggesting here... happy to change it if there is something better.

src/core/biblio-db.js Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Biblio cache might need clearing more often
2 participants