Skip to content

Conversation

chhill-redhat
Copy link
Contributor

@chhill-redhat chhill-redhat commented May 13, 2022

Summary

This PR allows the schema loader to cache external schemas which were fetched by Ajax calls. The cache is the browser's localStorage storage. Caching is opt-in feature. By default, the caches are valid only for the current calendar day. However, the consumer can pass an explicit cache buster (e.g., the cache buster can be a hash of the schemas, to invalidate caches when any schema changes).

Q A
Is bugfix?
New feature? ✔️
Is backward-compatible? ✔️
Tests pass? ✔️
Fixed issues None
Updated README/docs? ✔️
Added CHANGELOG entry?

@chhill-redhat chhill-redhat force-pushed the feature/schema-loader-cache-results branch 2 times, most recently from 92e3ade to 76d575e Compare May 13, 2022 19:17
@chhill-redhat chhill-redhat force-pushed the feature/schema-loader-cache-results branch from bc1b7fe to 6b0e7d1 Compare May 23, 2022 21:15
@chhill-redhat chhill-redhat marked this pull request as ready for review May 23, 2022 21:22
@chhill-redhat
Copy link
Contributor Author

@schmunk42 , this is ready for review. Tests pass locally (unit and e2e).

@germanbisurgi
Copy link
Collaborator

Hi @chhill-redhat,

Because the whole functionality of the json-editor depends on the schema-loader component, this PR will take a little more time to review as usual. We will give you feedback as soon as possible.

@chhill-redhat
Copy link
Contributor Author

@germanbisurgi , thank you for the update!

@mariohernandez
Copy link

Hi @germanbisurgi wondering if there are any updates on this PR. Thanks.

@slucero
Copy link

slucero commented Aug 2, 2022

Hi @germanbisurgi and @schmunk42, has there been any more opportunity to review and test this work to get it pushed forward?

What are the best next steps to get this pushed forward?

@schmunk42
Copy link
Collaborator

Sorry guys for the delay, we were just not able to find enough time to review.

@chhill-redhat
From my side it would be fine, since it is fully BC-compatible in the default setting, right?
So no cache is used when not explicitly enabled.

@chhill-redhat
Copy link
Contributor Author

@schmunk42 , no worries! You're right, it's BC by default, because the cache is disabled unless explicitly enabled.

@schmunk42 schmunk42 merged commit e128393 into json-editor:master Aug 15, 2022
@schmunk42
Copy link
Collaborator

@chhill-redhat Available in 2.9.0-beta.0 - thank you!

@chhill-redhat
Copy link
Contributor Author

Great. Thank you, @schmunk42 ! Really appreciate it.

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.

5 participants