elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
5.88k stars 1.06k forks source link

Refactor serializer options usage and enhance caching in workflow serialization #5275

Closed sfmskywalker closed 2 weeks ago

sfmskywalker commented 2 weeks ago

This update refactors multiple classes dealing with JSON serialization. The usage of serializer options now includes a caching mechanism to avoid unnecessary recomputation. 'CreateOptions' method is replaced by a 'GetOptions' method that considers cached options. Classes are adjusted to clone options when necessary, ensuring a fresh and accurate context each time.

Closes #5144