Skip to content

feat: cache date/time descriptor#124

Merged
dlockhart merged 2 commits intomainfrom
dlockhart/cache
Sep 11, 2023
Merged

feat: cache date/time descriptor#124
dlockhart merged 2 commits intomainfrom
dlockhart/cache

Conversation

@dlockhart
Copy link
Member

We're removing core's cache of the date/time descriptor because it had no way to know when to invalidate it when the language changed.

This re-adds the caching in a better place -- at the source!

@dlockhart dlockhart requested a review from a team September 8, 2023 19:21
@@ -691,266 +691,267 @@ export function convertUTCToLocalDateTime(date) {
}

export function getDateTimeDescriptor() {
Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing changed here except everything go indented around the cache call.

return settings.getCacheItem('dateTimeDescriptor', () => {
  // existing code here
});

@dlockhart dlockhart merged commit 3dd0747 into main Sep 11, 2023
@dlockhart dlockhart deleted the dlockhart/cache branch September 11, 2023 15:53
@ghost
Copy link

ghost commented Sep 11, 2023

🎉 This PR is included in version 3.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 this pull request may close these issues.

2 participants