-
Notifications
You must be signed in to change notification settings - Fork 703
Added cache system for schema loader. #1162
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
Added cache system for schema loader. #1162
Conversation
92e3ade
to
76d575e
Compare
bc1b7fe
to
6b0e7d1
Compare
@schmunk42 , this is ready for review. Tests pass locally (unit and e2e). |
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. |
@germanbisurgi , thank you for the update! |
Hi @germanbisurgi wondering if there are any updates on this PR. Thanks. |
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? |
Sorry guys for the delay, we were just not able to find enough time to review. @chhill-redhat |
@schmunk42 , no worries! You're right, it's BC by default, because the cache is disabled unless explicitly enabled. |
@chhill-redhat Available in |
Great. Thank you, @schmunk42 ! Really appreciate it. |
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).