json-editor icon indicating copy to clipboard operation
json-editor copied to clipboard

Added cache system for schema loader.

Open chhill-redhat opened this issue 3 years ago • 7 comments

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 avatar May 13 '22 19:05 chhill-redhat

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

chhill-redhat avatar May 23 '22 21:05 chhill-redhat

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 avatar Jun 02 '22 14:06 germanbisurgi

@germanbisurgi , thank you for the update!

chhill-redhat avatar Jun 03 '22 13:06 chhill-redhat

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

mariohernandez avatar Jul 06 '22 15:07 mariohernandez

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?

slucero avatar Aug 02 '22 13:08 slucero

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.

schmunk42 avatar Aug 10 '22 12:08 schmunk42

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

chhill-redhat avatar Aug 10 '22 15:08 chhill-redhat

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

schmunk42 avatar Aug 16 '22 15:08 schmunk42

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

chhill-redhat avatar Aug 16 '22 16:08 chhill-redhat