Added format conversion caching when Serializing/Deserializing#710
Open
HassanAkbar wants to merge 3 commits into
Open
Added format conversion caching when Serializing/Deserializing#710HassanAkbar wants to merge 3 commits into
HassanAkbar wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in, store-backed caching layer for format conversions to reduce repeated serialization/deserialization work (fixes #267), with configuration, documentation, and test coverage.
Changes:
- Introduces
cache_conversions+with_conversion_cacheto cachefrom_*results (model instances) andto_*results (serialized strings). - Adds
Lutaml::Model::Config.conversion_cachewith lazy auto-detection of a default in-memoryLutaml::Store::BasicStorewhenlutaml-storeis loaded, plus global disable viafalse. - Documents conversion caching behavior and adds comprehensive specs for cache key semantics, opt-in behavior, and backend quirks (e.g.,
CacheStoreJSON round-tripping).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/lutaml/model/conversion_caching_spec.rb | New specs covering caching behavior, key separation, disablement, and backend error propagation. |
| README.adoc | Adds a feature bullet and a new “Conversion caching” section referencing the dedicated doc. |
| lib/lutaml/model/serialize/format_conversion.rb | Wraps from/to conversions with the caching layer. |
| lib/lutaml/model/serialize/conversion_caching.rb | New caching implementation (keying, payload digesting, store integration). |
| lib/lutaml/model/serialize.rb | Autoloads/includes the caching module into Serializable class methods. |
| lib/lutaml/model/configuration.rb | Adds conversion_cache config with lazy default store auto-detection. |
| lib/lutaml/model/config.rb | Exposes Config.conversion_cache getter/setter API. |
| Gemfile | Adds lutaml-store for development/test usage. |
| docs/conversion_caching.adoc | New detailed documentation for activation rules, semantics, and limitations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #267