Conversation
This reverts commit 990995b.
|
@0bex0 curious whether you've created an issue with ajv regarding the double caching. Would love to solve it there, upgrade the dep, and retain your fix (assuming it's feasible within a quick timeframe) |
|
Alternatively, we might maintain our own cache, essentially compile the schema on first use, then cache the schema via a map owned by the validator, rather than using ajv's addSchema. Essentially, this approach https://ajv.js.org/guide/managing-schemas.html#caching-schemas-in-your-code |
The I'm not sure (without any updates to the |
|
I have added an issue here: ajv-validator/ajv#2554 (comment) and will address it in due course. This may not be possible until next week due to other commitments, but I have a fix in mind, yet to test it. |
|
In order to be backwards compatible, the double caching logic has to stay in place in the |
Reverts #1062
Comment highlighted issues with the
ajvlibrary which make this fix redundant, while inadvertently adding extra memory usage by using a secondary cache which is not used.